Bug 67090 - SQLiteStatement::getColumnText() could construct WTF::String result more efficiently.
Summary: SQLiteStatement::getColumnText() could construct WTF::String result more effi...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Andreas Kling
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-08-27 07:15 PDT by Andreas Kling
Modified: 2011-08-27 14:12 PDT (History)
2 users (show)

See Also:


Attachments
Proposed patch (1.42 KB, patch)
2011-08-27 07:18 PDT, Andreas Kling
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Kling 2011-08-27 07:15:55 PDT
Instead of using the WTF::String(const UChar*) constructor and traversing the string to determine the length, we should use sqlite3_column_bytes16() .
Comment 1 Andreas Kling 2011-08-27 07:18:31 PDT
Created attachment 105437 [details]
Proposed patch
Comment 2 Benjamin Poulain 2011-08-27 09:37:50 PDT
How much improvement?
Comment 3 Andreas Kling 2011-08-27 09:44:19 PDT
(In reply to comment #2)
> How much improvement?

Over 9000.
Comment 4 Andreas Kling 2011-08-27 10:11:23 PDT
(In reply to comment #3)
> (In reply to comment #2)
> > How much improvement?
> 
> Over 9000.

To clarify, I just spoke with Benjamin about this, he's concerned that the additional mutex lock (happens implicitly with any sqlite3 call) would negate any gains from avoiding the string traversal.
Comment 5 WebKit Review Bot 2011-08-27 14:12:37 PDT
Comment on attachment 105437 [details]
Proposed patch

Clearing flags on attachment: 105437

Committed r93945: <http://trac.webkit.org/changeset/93945>
Comment 6 WebKit Review Bot 2011-08-27 14:12:41 PDT
All reviewed patches have been landed.  Closing bug.