multitheftauto / mtasa-resources

This project maintains a list of up-to-date resources that come with Multi Theft Auto.
https://multitheftauto.com
MIT License
151 stars 149 forks source link

admin2: refactor performance settings #436

Open jlillis opened 1 year ago

jlillis commented 1 year ago

Which resource(s) have this problem? admin2

Describe the bug admin2 has performance settings which allow the user to select a performance priority (CPU, RAM, or "auto") which will allow them to unload unused UIs. While the settings exist, they are not actually used by anything.

Expected behavior admin2 should allow for cpu/memory prioritization by allowing users to unload unused UIs.

Screenshots image

Additional context Most (but not all) of the individual UI scripts are already partially setup with this setting in mind - their aWidget.Show() method will check if the form exists or not and their aWidget.Close(destroy) method has accepts an argument to indicate whether the UI should actually be destroyed or just hidden.

Additionally, I think we can simplify things by remove the "advanced" performance options and just have the CPU/RAM/auto options.

Dark-Dragon commented 1 year ago

The 'speed' option would keep everything loaded, whereas the 'memory' option would destroy all the widgets after use, but what would the 'auto' setting do? Keep widgets for a certain duration? Analyze which widgets are used the most and destroy the others? From the implementation side it might be easier to have the 3rd option be 'custom' and then prompt the user to select which widgets to keep loaded (via the existing 'advanced' window)

jlillis commented 1 year ago

It seems there is no actual logic for the "auto" setting as of now. My preference would be just to remove it and have just the "memory" and "cpu" options.