Closed Bug 1365278 Opened 3 years ago Closed 3 years ago

Many calls from gfxFont::GetShapedWord<..> to Telemetry::Accumulate

Categories

(Core :: Graphics: Text, enhancement)

enhancement
Not set

Tracking

()

RESOLVED FIXED
mozilla55
Tracking Status
firefox55 --- fixed

People

(Reporter: jseward, Assigned: jfkthame)

Details

(Whiteboard: [qf:p1])

Attachments

(1 file)

This is with a Stylo enabled build, with 8 stylo threads.
Loading the Obama wikipedia web page:
  https://en.wikipedia.org/wiki/Barack_Obama

Profiling with Callgrind shows the following
61,725 total calls to mozilla::Telemetry::Accumulate
of which 
  40,107 are from gfxFont::GetShapedWord<unsigned char>
   5,240 are from gfxFont::GetShapedWord<char16_t>

So in total 45,347 of 61,725 (73.4%) of the calls come
from this one function.

It also seems a rather excessive number of Telemetry calls
given that this is for the display of this one web page.  Given
that each such call causes a pthread_mutex_lock and unlock 
pair, it's potentially of concern from a parallel-performance
perspective.
Flags: needinfo?(jfkthame)
Whiteboard: [qf]
Whiteboard: [qf] → [qf:p1]
I think we should just remove these telemetry counters. It was good to check on cache behavior seen in the wild back when this was being implemented, but they're not really telling us anything useful on an ongoing basis, and this is pretty hot code where we shouldn't do extra work if we can help it.
Attachment #8872082 - Flags: review?(milan)
Attachment #8872082 - Flags: review?(milan) → review+
https://hg.mozilla.org/integration/mozilla-inbound/rev/adc68cbe1295500e348dd3ff8e6737f7b77006b0
Bug 1365278 - Remove WORD_CACHE_* telemetry probes that provide little value for their cost. r=milan
https://hg.mozilla.org/mozilla-central/rev/adc68cbe1295
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
Flags: needinfo?(jfkthame)
You need to log in before you can comment on or make changes to this bug.