Last Comment Bug 763693 - reduce overhead of telemetry in gfxFont::GetShapedWord
: reduce overhead of telemetry in gfxFont::GetShapedWord
Product: Core
Classification: Components
Component: Graphics: Text (show other bugs)
: unspecified
: All All
-- normal (vote)
: mozilla16
Assigned To: Jonathan Kew (:jfkthame)
: Milan Sreckovic [:milan]
Depends on:
Blocks: 762710
  Show dependency treegraph
Reported: 2012-06-11 14:16 PDT by Jonathan Kew (:jfkthame)
Modified: 2012-06-21 04:04 PDT (History)
1 user (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---

patch, simplify the word-cache telemetry to reduce overhead (3.14 KB, patch)
2012-06-11 14:16 PDT, Jonathan Kew (:jfkthame)
jfkthame: review+
Details | Diff | Splinter Review

Description User image Jonathan Kew (:jfkthame) 2012-06-11 14:16:08 PDT
Created attachment 632020 [details] [diff] [review]
patch, simplify the word-cache telemetry to reduce overhead

As noted in bug 762710 and bug 763119, the font-word-cache telemetry calls in gfxFont::GetShapedWord are incurring too much overhead, particularly in the common case where the word is found in the cache (and so we want GetShapedWord to be extremely fast).

This patch simplifies the telemetry (removing the per-script accounting, and ensuring that any given call only updates a single counter) to reduce this overhead. It's still more visible in profiles than I'd like; a further possible simplification would be to simply track the hit ratio without separating the statistics according to word length, so that there wouldn't be any need to figure out which bucket to increment.

Carrying over r=jdaggett from bug 762710#c12.
Comment 2 User image Ed Morley [:emorley] 2012-06-21 04:04:57 PDT

Note You need to log in before you can comment on or make changes to this bug.