Okay, found it. 11 years ago some code got added which changed a bunch of 
font prefs on the first run. We're still doing it. Each change in pref is 
causing the whole lot to be reloaded.

GL

On Thursday, 25 November 2021 at 10:46:09 UTC+13 Geoff Lankow wrote:

> Nope, this is the tip of both mozilla-central and comm-central. But you've 
> given me something to go on, at least. I'll keep digging. Thanks
>
> GL
>
> On Wednesday, 24 November 2021 at 22:56:28 UTC+13 [email protected] wrote:
>
>> On 24/11/2021 07:45, Geoff Lankow wrote: 
>> > And why would they be read /way/ more than they should be at start-up 
>> > (in comm/mail/base/test/performance/browser_preferences_usage.js) and 
>> > only on Windows? We're talking >1500 times for most of them, so 
>> > /something/ weird is going on. 
>> > 
>> > * bidi.direction 
>> > * bidi.numeral 
>> > * bidi.texttype 
>> > * browser.display.auto_quality_min_font_size 
>> > * dom.send_after_paint_to_content 
>> > * image.animation_mode 
>> > * layout.scrollbar.side 
>> > * toolkit.scrollbox.verticalScrollDistance 
>>
>> I don't know why Windows would be different from other platforms, but 
>> these look like the prefs that are read by 
>> nsPresContext::GetUserPreferences (see 
>>
>> https://searchfox.org/mozilla-central/rev/aa8c75b83f636948f708986173965c84cae8c25f/layout/base/nsPresContext.cpp#475-525).
>>  
>>
>>
>> So why is GetUserPreferences being called so many times? Its two 
>> callsites appear to be nsPresContext::AttachPresShell and 
>> nsPresContext::PreferenceChanged. 
>>
>> OK, I have a guess: if you're looking at a Gecko version prior to 93, 
>> which doesn't have https://bugzilla.mozilla.org/show_bug.cgi?id=1722487, 
>> then maybe we're being repeatedly notified of 
>> `font.internaluseonly.changed` pref-changes as fonts get initialized. 
>>
>> JK 
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"[email protected]" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/a/mozilla.org/d/msgid/dev-platform/e6c42fee-9752-40c8-a763-5041ee2cb8adn%40mozilla.org.

Reply via email to