-
Notifications
You must be signed in to change notification settings - Fork 49
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
Deduplicate in-memory Settings #260
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
and make this the source-of-truth. further refactorings incoming.
instead of cloning and getting stale
also in gstreamer fix a little inconsistentcy
…): accept "Keys" instead of "Settings" only pass around what is actually necessary
… accept "Keys" instead of "Settings" only pass around what is actually necessary
…c to own mockcomponent less duplication
…function avoids a clone and its the only place its used
… require "MockComponent"
…): accept "Keys" instead of "Settings" only pass around what is actually necessary
…handle_radio_ev" calls to require no cloning
…handle_input_ev" calls to require no cloning
there were soo many clones
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR refactors all code handling
Settings
which previously cloned everything, now there is only ever 1 instance active in each binary (except while in the tui config editor), in more details:Settings
to not clone the whole instances anymore and use shared accessplayback::PlayerTrait
'svolume*
andspeed*
function to always return the new valuetui::ui::components::tag_editor::te_input
&tui::ui::components::config_editor::general
refactor to be easier handle-able (and remove some duplicate code)for whats it worth, some stats:
Memory changes (i dont know if i collected it correctly, collected from the debug builds):
(master(008aae4) -> PR(7993fa6))
termusic-server
VSZ2191644 KB
->2191632 KB
[-12 KB
]termusic-server
RSS85056 KB
->86200 KB
[+1144 KB
]termusic
VSZ2768932 KB
->2768656 KB
[-276 KB
]termusic
RSS71692 KB
->71412 KB
[-280 KB
]Binary size:
debug
termusic-server
292697872 Bytes
->292756224 Bytes
[+58352 Bytes
(~57KB)]release
termusic-server
23586664 Bytes
->23556736 Bytes
[-29928 Bytes
(~29KB)]debug
termusic
312275448 Bytes
->312431664 Bytes
[+156216 KB
(~153KB)]release
termusic
30627376 Bytes
->30579824 Bytes
[-47552 KB
(~46KB)]even if the sizes are not much different (even getting bigger in debug), this way we wont have stale data or duplicate data in memory
re #214