Closed Bug 675317 Opened 13 years ago Closed 13 years ago

Font cache on Android not working

Categories

(Core :: Graphics, defect, P1)

All
Android
defect

Tracking

()

RESOLVED DUPLICATE of bug 684889

People

(Reporter: stechz, Assigned: dougt)

Details

(Keywords: helpwanted, mobile, perf, Whiteboard: mobilestartupshrink)

On my Nexus S: I/GeckoFonts( 1409): got: /system/fonts/DroidSansMono.ttf;droid sans mono,;1304791538;119380;0,;/system/fonts/DroidSansFallback.ttf;droid sans fallback,;1304791538;3725920;0,;/system/fonts/DroidSerif-Regular.ttf;droid serif,;1304791540;172916;0,;/system/fonts/DroidSerif-Italic.ttf;droid serif,;1304791539;177560;0,;/system/fonts/DroidSansHebrew.ttf;droid sans hebrew,;1290634940;23076;0,;/system/fonts/DroidSans.ttf;droid sans,;1304791537;190776;0,;/system/fonts/DroidSerif-BoldItalic.ttf;droid serif,;1304791539;190304;0,;/system/fonts/DroidSansArabic.ttf;droid sans arabic,;1304791537;35880;0,;/system/fonts/DroidSerif-Bold.ttf;droid serif,;1304791539;185228;0,;/system/fonts/DroidSans-Bold.ttf;droid sans,;1304791537;194488;0,;/system/fonts/Clockopia.ttf;clockopia,;1290634940;6880;0,;/system/fonts/DroidSansThai.ttf;droid sans thai,;1290634940;36028;0,; from the cache I/Gecko ( 1409): Falling back to reading font list again I/Gecko ( 1409): Falling back to reading font list again I/Gecko ( 1409): Falling back to reading font list again I/Gecko ( 1409): Falling back to reading font list again I/Gecko ( 1409): Falling back to reading font list again I/Gecko ( 1409): Falling back to reading font list again I/Gecko ( 1409): Falling back to reading font list again I/Gecko ( 1409): Falling back to reading font list again I/Gecko ( 1409): Falling back to reading font list again I/Gecko ( 1409): Falling back to reading font list again I/Gecko ( 1409): Falling back to reading font list again I/Gecko ( 1409): Falling back to reading font list again I/Gecko ( 1409): Falling back to reading font list again I/Gecko ( 1409): Falling back to reading font list again I/Gecko ( 1409): Falling back to reading font list again That looks like 12 different fonts cached, but 15 different fonts are searched for in the cache and not found.
Whiteboard: mobilestartupshrink
Priority: -- → P1
Keywords: helpwanted, mobile, perf
OS: All → Android
daggett, is there any improvement we can make here on Android?
This is the code that Brad wrote, I think you need to debug why the cached fontinfo is different (i.e. modified data different? size different?). If this is happening all the time, then that's peculiar and we should figure out why. If this happens only after a system update, then this is expected behavior I would think, if the new versions of the fonts are updated.
I do not see this on my s2. This bug is pretty old. in fact, the code for logging "Falling back to reading font list again" doesn't event exist any more. please reopen if you can reproduce.
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → WORKSFORME
You didn't think you'd get away that easy, do you? :) The debug code was added by me. I'll upload the patch a little bit later. It is happening all the time for me. Or at least was when I filed it.
Status: RESOLVED → REOPENED
Resolution: WORKSFORME → ---
Damn!
Assignee: nobody → doug.turner
Benjamin, could you log exactly what didn't match? i.e. the mod date or the size? We need to try and get a reproducible testcase for this.
I added logging on my g2, and didn't see anything suspect. I saw twentysome font files loaded once, and I saw not other hits. besides the logging, do you have a set of pages that trigger this?
(In reply to Doug Turner (:dougt) from comment #7) > besides the logging, do you have a set of pages that trigger this? Font loading occurs at startup, why would a specific page affect/trigger this? (Might be possible, dunno, but I'm sort of scratching my head as to how that would be possible).
jtd - just grasping at straws. I don't really see a problem on my phone.
Still not seeing the cache ever hit on my Nexus S. This is what I was using: http://hg.mozilla.org/users/bstover_mozilla.com/mozilla-pq/file/fb4f17905a99/startup-fontcache
doesn't this change cause you to see all of those printf's? 15 - int stat_ret = stat(aFileName, &s); 16 + int stat_ret = 0;
In looking at our current Android font code, I've noticed that it is not optimally structured, and am aiming to restructure it significantly. This includes moving and updating the font-name cache stuff. See bug 684889.
okay. marking this as a dup.
Status: REOPENED → RESOLVED
Closed: 13 years ago13 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.