Rockbox

This is the bug/patch tracker for Rockbox. Click here for more information.

Quick links: Bugs · Patches · Rockbox frontpage

Tasklist

FS#12361 - Smart settings_load_config() so it only does setting_apply() if required

Attached to Project: Rockbox
Opened by Jonathan Gordon (jdgordon) - Tuesday, 01 November 2011, 11:49 GMT+2
Task Type Patches
Category Settings
Status New
Assigned To No-one
Player Type All players
Severity Low
Priority Normal
Reported Version Release 3.9
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Private No

Details

in svn settings_apply() is called whenever a config is loaded (after boot) regardless of what is in the file. even an empty one will cause a full settings_apply() (which is slow, causes disk access and will stop music thanks to the buflib users).

This patch will apply settings individually if they have a callback registered, and if no settings without a callback are applied it doesnt bother calling settings_apply().
   smart_settings_apply.diff (2.8 KiB)
 b/apps/settings.c |   43 ++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 42 insertions(+), 1 deletion(-)

This task depends upon

Comment by Jonathan Gordon (jdgordon) - Tuesday, 01 November 2011, 12:10 GMT+2
And apply this one after which moves to fast_readline. Benchmarking on my CF-ed video shows no difference at all (with or without this part of the patch), need someone with a spindle device to benchmark
   0002-Move-to-fast_readline.patch (12.2 KiB)
 b/apps/settings.c |  235 +++++++++++++++++++++++++++---------------------------
 1 file changed, 120 insertions(+), 115 deletions(-)

Comment by Boris Gjenero (dreamlayers) - Tuesday, 20 December 2011, 21:44 GMT+2
On both 5G 30GB iPod and Archos Recorder V2, both with original hard drives, there is a small speedup with smart_settings_apply.diff. It's just a fraction of a second though. I'm don't know how to measure such a small change. With the patch, the splash(HZ, ID2P(LANG_SETTINGS_LOADED)); stands out more as a waste of time. I think the speedup is only really beneficial if that wait is removed also.

In my opinion, avoiding music interruption due to buflib is far more important than the tiny speedup. However, I'm not sure when this would help now. It seems settings_apply_skins() causes the interruption, and it's conditional on theme_changed.

I'm attaching a resynced patch. I did not try 0002-Move-to-fast_readline.patch because it is harder to resync.
   smart_settings_apply-r31378.diff (2.8 KiB)
 apps/settings.c |   43 ++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 42 insertions(+), 1 deletion(-)

Loading...