Closed Bug 796005 Opened 12 years ago Closed 11 years ago

Add telemetry for XUL cache being disabled

Categories

(Core :: XUL, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla23

People

(Reporter: mccr8, Assigned: bindarel)

References

Details

Attachments

(1 file, 4 obsolete files)

Some addons (like extension developer addons) set this pref ( nglayout.debug.disable_xul_cache ) without the user being aware of it, and it can cause severed performance degradation. It might be good to track how widespread of a problem this is.

I'm not sure what exactly we can do about this, aside from maybe alerting the user or something.
Hi, would this telemetry be still useful?
I think so. It would be good to know how often users suffer from significantly slower UI because
the xul cache is disabled-
So, the telemetry should only measure the xul_cache switches to disabled?
Attached patch Patch v1 (obsolete) — Splinter Review
Attachment #734717 - Flags: review?(jag-mozilla)
Comment on attachment 734717 [details] [diff] [review]
Patch v1

Did you mean for Olli to review?
Attachment #734717 - Flags: review?(jag-mozilla) → review?(bugs)
(In reply to Andrew McCreight [:mccr8] from comment #5)
> Comment on attachment 734717 [details] [diff] [review]
> Patch v1
> 
> Did you mean for Olli to review?

Sorry, my bad, fixing now.
Its okay, I already switched it over to asking him for review instead. :)
Thanks a lot.
Comment on attachment 734717 [details] [diff] [review]
Patch v1

+    if ( gDisableXULCache )
+        Telemetry::Accumulate(Telemetry::XUL_CACHE_DISABLED, true);
should be
    if (gDisableXULCache) {
        Telemetry::Accumulate(Telemetry::XUL_CACHE_DISABLED, true);
    }


But the kind for XUL_CACHE_DISABLED should be "flag", not "boolean" I believe.
Attachment #734717 - Flags: review?(bugs) → review-
Attached patch patch v2 (obsolete) — Splinter Review
Attachment #734717 - Attachment is obsolete: true
Attachment #735323 - Flags: review?(bugs)
Attached patch patch v2.1 (obsolete) — Splinter Review
Attachment #735323 - Attachment is obsolete: true
Attachment #735323 - Flags: review?(bugs)
Attachment #735787 - Flags: review?(bugs)
Comment on attachment 735323 [details] [diff] [review]
patch v2


>     // Flush the cache, regardless
>     nsXULPrototypeCache* cache = nsXULPrototypeCache::GetInstance();
>     if (cache)
>         cache->Flush();
>+    if (gDisableXULCache)
>+        Telemetry::Accumulate(Telemetry::XUL_CACHE_DISABLED, true);
please add a new line before if
But looks like we update gDisableXULCache variable in two places, so you need to call Telemetry in both places, or better would be to add a helper method
which updates gDisableXULCache and calls telemetry


>+  "XUL_CACHE_DISABLED": {
>+    "kind": "flag",
>+    "description": "Xul cache was disabled"
It is XUL, not Xul
Attachment #735323 - Attachment is obsolete: false
Attachment #735787 - Flags: review?(bugs) → review-
Olli Pettay:
  Thanks for review, I will implement it soon. It's ok if I make the method member of the nsXULPrototypeCache class?
Attached patch Patch v3 (obsolete) — Splinter Review
Attachment #735942 - Flags: review?(bugs)
Comment on attachment 735942 [details] [diff] [review]
Patch v3

Make UpdategDisableXULCache return void, so you don't have to have return 0.
Attachment #735942 - Flags: review?(bugs) → review+
Attached patch Patch v3.1Splinter Review
Attachment #736786 - Flags: review?(bugs)
Comment on attachment 736786 [details] [diff] [review]
Patch v3.1

I'll land this soon.
Attachment #736786 - Flags: review?(bugs) → review+
(In reply to Olli Pettay [:smaug] from comment #17)
> Comment on attachment 736786 [details] [diff] [review]
> Patch v3.1
> 
> I'll land this soon.

Thanks a lot.
Thanks for fixing this!
Assignee: nobody → bindarel
Attachment #735323 - Attachment is obsolete: true
Attachment #735787 - Attachment is obsolete: true
Attachment #735942 - Attachment is obsolete: true
https://hg.mozilla.org/mozilla-central/rev/76c3843d0c31
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla23
Huzzah.  This should be in tomorrow's Nightly.  In about a week, Olli or I should look to see if anything has shown up in telemetry.
It is still a bit early for data, but looking at metrics.mozilla.com it looks like 0.5% have the cache disabled.  I assume that means it was disabled at least once during whatever session the telemetry is for.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: