FS#12309 - font buflib: mass storage activity when skipping buffered tracks?

Attached to Project: Rockbox
Opened by Andree Buschmann (Buschel) - Monday, 03 October 2011, 09:11 GMT
Last edited by Andree Buschmann (Buschel) - Friday, 14 October 2011, 05:47 GMT
Task Type Bugs
Category Themes
Status Closed
Assigned To No-one
Operating System All players
Severity Low
Priority Normal
Reported Version Release 3.9
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No


I observed that the HDD-icon on my WPS shows activity when skipping between buffered songs. Bisecting shows this came in between r30580 and r30590 -- most likely the font buflib commit is the relevant change. As this behaviour results in a spin-up of HDD's with a track change this might impact the battery runtime.

I have attached my WPS as this might be needed for reproduction. (72.4 KiB)
This task depends upon

Closed by  Andree Buschmann (Buschel)
Friday, 14 October 2011, 05:47 GMT
Reason for closing:  Duplicate
Additional comments about closing:  Has been moved to  FS#12299 .
Comment by Andree Buschmann (Buschel) - Monday, 03 October 2011, 14:34 GMT
Attached is a quick and dirty patch to get rid of this font reloading for fonts up to 256 KB size. The patch does three things:
1) Enlarge the font buffer size to 256 KB -> This way the fonts from my WPS are fully loaded to RAM.
2) Call font_load() instead of font_load_ex() to ensure to load the full font.
3) Remove unused defines. Has no impact at all.

I am still confused why this font reloading occurs since the font buflib change. Before the buflib change the max font size was 60 KB (as in current svn) and the raw font loading (firmware/fontc.) itself did not change with the buflib change. Even though the full font was *not* loaded in svn before the font buflib change, there was no font reloading seen.

Question: Why does it make it make a difference *now* whether a font is fully loaded or not? The former code did not seem to care -- at least for the same fonts and usecases.
Comment by Fred Bauer (freddyb) - Tuesday, 04 October 2011, 11:46 GMT
Isn't this a duplicate of  FS#12299 ?
Comment by Andree Buschmann (Buschel) - Tuesday, 04 October 2011, 17:05 GMT
It might be the same, Jd also assumes there is something wrong with the glyph cache.