Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom Generic Arguments field causes performance degradation #17

Open
brecert opened this issue May 4, 2024 · 3 comments
Open

Custom Generic Arguments field causes performance degradation #17

brecert opened this issue May 4, 2024 · 3 comments

Comments

@brecert
Copy link
Contributor

brecert commented May 4, 2024

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.

@BlueCyro
Copy link
Owner

BlueCyro commented May 4, 2024

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

@BlueCyro
Copy link
Owner

BlueCyro commented May 4, 2024

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.

@BlueCyro
Copy link
Owner

BlueCyro commented Jul 1, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants