BlueCyro / CherryPick

Simple component searching for Resonite

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Custom Generic Arguments field causes performance degradation

brecert opened this issue · comments

commented

CherryPick's generic arguments field lags significantly compared to without the mod.

I think CherryPick may be checking if the type is valid every frame as more complex types cause more lag and every node browser with types in the generic arguments field affect it.

An easy way to reproduce this is to use IValue<IValue<IValue<IValue<IValue<IValue<IValue<IValue<IValue<IValue<IValue>>>>>>>>>> as the generic custom arguments for WriteDynamicObjectVariable.

On my system it degrades the engine update time to ~30fps, compared to without the mod where it's ~275fps.

commented

Please provide logs, make sure your RML is up to date and make sure CherryPick is up to date.

commented

Just as an FYI, I was able to replicate this, but please do remember to include those in the future. This appears to be another case of voodoo magic that I've run into, and is potentially related to #10.

The running theory I have is that reflecting all of the types in the game causes a cache buildup somewhere, and that cache is hit whenever certain parts of reflection are used. This is going to prove hard to diagnose, so don't expect an immediate fix.

commented

I changed up how CherryPick populates its component cache, and this should be far less of an issue now. Give release 1.1.0 a shot and tell me how it goes! If all is well, I'll close up this issue.