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:
refactor all handling of Settings to not clone the whole instances anymore and use shared access
update playback::PlayerTrait's volume* and speed* function to always return the new value
tui::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(008aae4e8dff7e451281ac164e9f0b1dc06c371e) -> PR(7993fa63c9b2defd9b47e23449c5d7d76a2cf8d5))
termusic-server VSZ 2191644 KB -> 2191632 KB [-12 KB]
termusic-server RSS 85056 KB -> 86200 KB [+1144 KB]
termusic VSZ 2768932 KB -> 2768656 KB [-276 KB]
termusic RSS 71692 KB -> 71412 KB [-280 KB]
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(008aae4e8dff7e451281ac164e9f0b1dc06c371e) -> PR(7993fa63c9b2defd9b47e23449c5d7d76a2cf8d5))
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)] releasetermusic-server
23586664 Bytes
->23556736 Bytes
[-29928 Bytes
(~29KB)] debugtermusic
312275448 Bytes
->312431664 Bytes
[+156216 KB
(~153KB)] releasetermusic
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