[Webkit-unassigned] [Bug 34489] [Qt] Text codec lookup is slow

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Feb 3 02:06:32 PST 2010


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


Simon Hausmann <hausmann at webkit.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |benjamin.poulain at nokia.com,
                   |                            |zecke at selfish.org




--- Comment #7 from Simon Hausmann <hausmann at webkit.org>  2010-02-03 02:06:30 PST ---
(In reply to comment #3)
> Thanks for the comments, I will rework this as suggested by Laszlo and Ariya.
> 
> QTextCodec internally already maintains a cache of text codecs. The performance
> problem is caused by the fact that QTextCodec has to check for the name and
> aliases associated with each codec in order to return from their cache. The
> proposed webkit local cache is for usage locality when we request the same
> codec over and over again. (I'll also log something to Qt if appropriate)

I have to agree with Ariya's earlier comment: This should be fixed in Qt, not
worked around with increased memory usage in WebKit.

Depending on your use-case there may be different ways of fixing this. For
example if in your case it's always the same codec that is requested, perhaps
it would make most sense to cache the last returned codec inside of
QTextCodec::codecByName and before traversing through the entire list, check if
the requested codec is like the last one and return it.

-- 
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