-
-
Notifications
You must be signed in to change notification settings - Fork 156
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
admin2: cache meta settings #162
Comments
I don't think that caching the settings is really worth it. Wouldn't the admin need to restart the resource every time he changed some setting? That would kinda suck. |
|
A PR (#198) which would have addressed this issue was just closed. I think we should also consider marking this issue as |
get function is very slow since it parses meta.xml every time, so it really comes down to how often it will be used |
1: How slow are we talking? |
Its really that slow, yes. |
Maybe we should stop supporting live setting changes in meta.xml files in mtasa-blue. The correct way is to use the settings system. meta.xml should only define the settings schema (and defaults). Where does the server store changes to settings via |
I'm going to close this because If there are any major objections, feel free to comment here. |
Is your feature request related to a problem? Please describe.
Currently admin2 does not cache any of its meta settings so it is required to call the get function each time the setting is read.
#161 adds new settings so it would be good to look into this issue first.
Describe the solution you'd like
Implement a system that would cache the settings and update them onSettingChange.
Describe alternatives you've considered
Additional context
This was already implemented in the old admin resource:
https://github.com/multitheftauto/mtasa-resources/blob/master/%5Badmin%5D/admin/server/admin_serverprefs.lua
It could be improved further by adding 'serveronly' attribute so not all settings are sent to the client.
The text was updated successfully, but these errors were encountered: