[Webkit-unassigned] [Bug 46374] [Chromium] FontLinux performance improvement and cleanup

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Sep 23 18:13:14 PDT 2010


https://bugs.webkit.org/show_bug.cgi?id=46374





--- Comment #6 from Xiaomei Ji <xji at chromium.org>  2010-09-23 18:13:14 PST ---
(In reply to comment #4)
> By my reading this patch ends up zeroing already zeroed memory and saves no allocations. Maybe I'm missing something, but I think you need to be clearer.

Using http://www.google.ae/preferences?hl=ar  as an example.

Following is the change of m_item.num_glyphs after the call of HB_ShapeItem().

54 --> 5
5 --> 1
1 --> 8
.....

The array is zero-ed initially (with size 54), so there is no problem when shaping the first script run.
After shaping, the m_item.num_glyphs changed to 5.

Then, when shaping next script run, since there is enough space available for HB_ShapeItem(), no deleteGlypyArrays/createGlyphArrays will be called, *but* the no zero-ing array is called either, so the next script run's shaping is based on a dirty array. This is one issue the patch addressed.

In the 3rd script run, although there is actually an array of size 54, the recorded num_glyphs is 1, and it is less than the needed size, so, array of size 54 is deleted and an array of size 8 is created. 
The increase of num_glyphs from one run to its next is not uncommon. And above delete/new will introduce extra overhead. This is the 2nd issue the patch addressed.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list