[webkit-reviews] review requested: [Bug 34489] [Qt] Text codec lookup is slow : [Attachment 47948] Proposed text codec patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Feb 2 10:28:09 PST 2010


David Leong <david.leong at nokia.com> has asked  for review:
Bug 34489: [Qt] Text codec lookup is slow
https://bugs.webkit.org/show_bug.cgi?id=34489

Attachment 47948: Proposed text codec patch
https://bugs.webkit.org/attachment.cgi?id=47948&action=review

------- Additional Comments from David Leong <david.leong at nokia.com>
Qt's text codec implementation is slow when converting many strings of the same
codec type. It creates a new QTextCodec for each string that it needs to
convert, and internally does name comparisons against a list of codecs and
aliases. 

We have a use case where we are passing data from a NPPlugin to Javascript.
Many of the NPAPIs internally converts strings and uses the TextCodec. We have
found that the TextCodec construction is taking over 50% of the execution time.


We propose to add a fast hashmap lookup table to the TextCodec implementation.
If the same codec is used repeatedly it can be quickly retrieved.


More information about the webkit-reviews mailing list