-
-
Notifications
You must be signed in to change notification settings - Fork 438
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
Improve settings system performance #1863
Comments
The problem with caching is that we'd need to keep track when the file gets modified. |
Strictly speaking, I don't think outside modification of settings is currently supported. The wiki states (emphasis mine):
The most common use case for administrators using the settings system is to change the setting from within the admin panel (technically a "script" in the context of the wiki quote). I think this and changes via console are the only use cases that need to be supported. Dropping the ability to modify settings files during runtime doesn't count as "backwards-incompatible" as that functionality was never added intentionally or guaranteed to exist. |
Ah, youre'right. |
Is your feature request related to a problem? Please describe.
Currently, the settings system functions are slow. Per discussion here it would be good to improve this within mtasa-blue to benefit all resources rather than just caching within the admin resource.
Describe the solution you'd like
Some form of caching or other code improvements to improve the performance of the settings system functions.
Describe alternatives you've considered
1 - Do nothing: see context below
2 - Cache settings per resource: will result in duplicated resource code and limited benefits.
Additional context
I bench marked 10,000 calls to
get
at 60ms which is a bit slow. However, I believe it is unlikely thatget
will be called 10,000 times in a single frame. This suggests that alternative 1 (do nothing) would also be acceptable.The text was updated successfully, but these errors were encountered: