Custom Generic Arguments field causes performance degradation #17
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: cyro/CherryPick#17
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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 forWriteDynamicObjectVariable
.On my system it degrades the engine update time to ~30fps, compared to without the mod where it's ~275fps.
Please provide logs, make sure your RML is up to date and make sure CherryPick is up to date.
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.
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.