Bug 45488 - Use String::fromUTF8 instead of UTF8Encoding().decode in the libxml XMLDocumentParser
Summary: Use String::fromUTF8 instead of UTF8Encoding().decode in the libxml XMLDocume...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: XML (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Patrick R. Gansterer
URL:
Keywords:
Depends on:
Blocks: 43085 49581
  Show dependency treegraph
 
Reported: 2010-09-09 13:27 PDT by Patrick R. Gansterer
Modified: 2010-11-20 09:40 PST (History)
2 users (show)

See Also:


Attachments
Patch (1.50 KB, patch)
2010-09-09 13:31 PDT, Patrick R. Gansterer
no flags Details | Formatted Diff | Diff
Patch #2 (1.12 KB, patch)
2010-11-20 01:22 PST, Patrick R. Gansterer
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick R. Gansterer 2010-09-09 13:27:06 PDT
see patch
Comment 1 Patrick R. Gansterer 2010-09-09 13:31:00 PDT
Created attachment 67087 [details]
Patch
Comment 2 Darin Adler 2010-09-09 14:24:22 PDT
Why?
Comment 3 Patrick R. Gansterer 2010-09-09 14:36:46 PDT
(In reply to comment #2)
> Why?
bug 43085
IMHO String::fromUTF8 avoids the TextEncoding overhead?

I also want to replace most of the toString calls with a new toAtomicString method. QualifiedName (used for elements and attributes) takes AtomicString as arguments. Creating AtomicString instead of String can avoid many memcpy operations IMHO.
If we implement a AtomicString::fromUTF8 which works directly with the utf8 data for hash and compare we can avoid many convertUTF8ToUTF16 operations too.
Comment 4 Darin Adler 2010-09-09 14:39:24 PDT
(In reply to comment #3)
> IMHO String::fromUTF8 avoids the TextEncoding overhead?

OK. Next time you can just say so in the code or change log, and save a round of questioning ;-)
Comment 5 WebKit Commit Bot 2010-09-10 10:45:18 PDT
Comment on attachment 67087 [details]
Patch

Clearing flags on attachment: 67087

Committed r67214: <http://trac.webkit.org/changeset/67214>
Comment 6 WebKit Commit Bot 2010-09-10 10:45:23 PDT
All reviewed patches have been landed.  Closing bug.
Comment 7 Patrick R. Gansterer 2010-11-20 01:22:07 PST
Created attachment 74475 [details]
Patch #2

Missed the second toString in the first patch.
Comment 8 WebKit Commit Bot 2010-11-20 09:39:11 PST
The commit-queue encountered the following flaky tests while processing attachment 74475 [details]:

inspector/styles-source-offsets.html

Please file bugs against the tests.  These tests were authored by apavlov@chromium.org and pfeldman@chromium.org.  The commit-queue is continuing to process your patch.
Comment 9 WebKit Commit Bot 2010-11-20 09:40:23 PST
Comment on attachment 74475 [details]
Patch #2

Clearing flags on attachment: 74475

Committed r72476: <http://trac.webkit.org/changeset/72476>
Comment 10 WebKit Commit Bot 2010-11-20 09:40:28 PST
All reviewed patches have been landed.  Closing bug.