[Webkit-unassigned] [Bug 12007] New: SVGColor::setRGBColor color creates/deletes many strings, slowing down parsing
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Dec 27 16:12:26 PST 2006
http://bugs.webkit.org/show_bug.cgi?id=12007
Summary: SVGColor::setRGBColor color creates/deletes many
strings, slowing down parsing
Product: WebKit
Version: 420+ (nightly)
Platform: Macintosh
OS/Version: Mac OS X 10.4
Status: NEW
Severity: Normal
Priority: P2
Component: SVG
AssignedTo: webkit-unassigned at lists.webkit.org
ReportedBy: macdome at opendarwin.org
SVGColor::setRGBColor color creates/deletes many strings, slowing down parsing
(for bamboo.svg)
Now that some of the other parsers are fixed, SVGColor::setRGBColor is one of
the next hot-spots appearing in Shark when running the SVG PLT. setRGBColor
creates and deletes strings needlessly while parsing the color value.
Rob has already coded a fix:
http://paste.lisp.org/display/33499
Which looks fine to me. r=me on the code change.
We still need some additional tests before he lands (e.g. to make sure that the
change in behavior to not change the color to invalid when the parse fails).
http://paste.lisp.org/display/33500
was his first stab at a test case. However we came up with a few improvements
via IRC:
1. call setRGBColor('green') first (to make sure setRGBColor actually works)
2. wrap each call in some sort of try/catch block and check the exception
(perhaps an expectsException() wrapper?)
3. Test paints with leading spaces, commas, and spacing between digits and %
(which should be invalid).
--
Configure bugmail: http://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
More information about the webkit-unassigned
mailing list