-
Notifications
You must be signed in to change notification settings - Fork 738
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
Cache config UI #4234
Cache config UI #4234
Conversation
Just did a test and for some reason this is actually a bit slower. Calling I am a tad bit confused honestly. Main goal was to prevent EDIT: And the element I was testing this with has no conditions specified (empty class), so |
Was using wrong argument in the test case, proper test case shows ( So |
I'm under the impression that BIS sped up reading from config. While fiddling the other day it seemed like caching a config entry on a namespace vs reading it from config wasn't much different anymore. It should be properly confirmed though. I bet there're perf numbers for config reads buried somewhere among old PRs. |
If that's true then the only reason to do any caching is due to |
Over-all, I got the This is good to go! 👍 |
That's a tough one. Configs are read from disk, so it really depends on your setup.
|
Are you sure? Game compiles them on start, I would hope they are in memory. |
Yeah, I think so too. My guess was that they were in memory, but structured in such a way that accessing them was not performant. If that's the case they might have changed the implementation. |
As far as I can tell, Arma used to read all config entries and store them as a tree. Each node of the tree is a config class, that contains all their children. Children are accessed by name using a hashtable. That implementation seems to make sense, and shouldn't be too slow. IDK why we used to measure such poor performance at some point, but I'm quite sure that was the case. |
That's good to know, would be nice if we could get some definite answer on it, but I am not sure that's likely. |
When merged this pull request will:
compile
only be called once per config on mission start instead of on everyinfoDisplayChanged
andsettingChanged
eventfnc_setAdvancedElement
(~0.09 ms -> ~0.062 ms)