[Webkit-unassigned] [Bug 46374] New: [Chromium] FontLinux performance improvement and cleanup
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Sep 23 10:44:50 PDT 2010
https://bugs.webkit.org/show_bug.cgi?id=46374
Summary: [Chromium] FontLinux performance improvement and
cleanup
Product: WebKit
Version: 528+ (Nightly build)
Platform: Other
OS/Version: Linux
Status: NEW
Severity: Normal
Priority: P2
Component: Layout and Rendering
AssignedTo: webkit-unassigned at lists.webkit.org
ReportedBy: xji at chromium.org
On behalf of Claire who investigated the problem in Android.
ChangeSet #61795 (http://trac.webkit.org/changeset/61795/trunk/WebCore/platform/graphics/chromium/FontLinux.cpp) did FontLinux.cpp cleanup to fix the complex script overlap problem. The problem is fixed probably by delete and new glyph arrays so the arrays are clean when use. Now, the overlap issue is gone but Android team reported there is a core dump in FontAndroid.cpp which is similar to FontLinux.cpp in Chrome.
While investing the new core dump problem, Claire found there is unnecessary free/new memory in the code. Here is the high level code structure:
Font:: *ComplexText
...
while (walker.nextScriptRun()) {
....
}
...
bool nextScriptRun() {
...
shapeGlyphs();
...
}
void shapeGlyphs() {
...
for (;;) {
if (HB_ShapeItem(&m_item)) ==> m_item.num_glyphs is changed after this call.
break;
deleteGlyphArrays();
createGlyphArrays(m_item.num_glyphs);
==> delete/createGlyphArrays are hit if m_item.num_glyphs > previous m_item.num_glyphs
...
}
HB_Bool HB_ShapeItem(HB_ShaperItem *shaper_item)
{
HB_Bool result = false;
if (shaper_item->num_glyphs < shaper_item->item.length) {
shaper_item->num_glyphs = shaper_item->item.length;
return false;
}
...
}
So, Claire proposed to resume the setting of m_item.num_glyphs = m_maxGlyphs before HB_ShapeItem() call to minimize the number of delete/new and always cleanup all glyph arrays before re-using them.
--
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