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.