[Webkit-unassigned] [Bug 105186] New: V8 SerializedScriptValue assignment is expensive
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Mon Dec 17 08:58:40 PST 2012
https://bugs.webkit.org/show_bug.cgi?id=105186
Summary: V8 SerializedScriptValue assignment is expensive
Product: WebKit
Version: 528+ (Nightly build)
Platform: Unspecified
OS/Version: Unspecified
Status: NEW
Severity: Normal
Priority: P2
Component: WebCore JavaScript
AssignedTo: webkit-unassigned at lists.webkit.org
ReportedBy: alecflett at chromium.org
Depends on: 104354
After bug 104354 is fixed, the easiest interface to SSV is via Vector<uint8_t>
The problem is that when you assign a Vector<uint8_t> to the SSV, it immediately does a byte-swapping copy (using htons/ntohs) and when you read the buffer from the SSV it does a similar byte-swapping copy.
Two things need to be fixed:
1) The copy should be avoided by also having an adopt-ing constructor
2) The htons/ntohs for parsing/serializing should be happening in the parser/serializer
The reason this is important is that there are use cases (like IDB) where SSV is used as an intermediate stage that MIGHT never get parsed/deserialized.
The IDB case is: A key and value are read from the database, and passed up to a JS caller. The JS caller never looks at the "value" so we shouldn't be paying the price of mucking with those bits.
While there, the whole V8 SSV parser/serializer uses String as its interface, which is really broken simply from a code perspective because a String is a buffer of 16-bit characters, but the parser/serializer internally just deals with a stream of bytes.
--
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