Changeset 89184 in webkit for trunk/Source/JavaScriptCore/ChangeLog
- Timestamp:
- Jun 17, 2011, 9:25:57 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r89171 r89184 1 2011-06-17 Oliver Hunt <[email protected]> 2 3 Reviewed by Gavin Barraclough. 4 5 JSONP is unnecessarily slow 6 https://bugs.webkit.org/show_bug.cgi?id=62920 7 8 JSONP has unfortunately become a fairly common idiom online, yet 9 it triggers very poor performance in JSC as we end up doing codegen 10 for a large number of property accesses that will 11 * only be run once, so the vast amount of logic we dump to handle 12 caching of accesses is unnecessary. 13 * We are doing codegen that is directly proportional to just 14 creating the object in the first place. 15 16 This patch extends the use of the literal parser to JSONP-like structures 17 in global code, handling a number of different forms I have seen online. 18 In an extreme case this improves performance of JSONP by more than 2x 19 due to removal of code generation and execution time, and a few optimisations 20 that I made to the parser itself. 21 22 * API/JSValueRef.cpp: 23 (JSValueMakeFromJSONString): 24 * interpreter/Interpreter.cpp: 25 (JSC::Interpreter::callEval): 26 (JSC::Interpreter::execute): 27 * parser/Lexer.cpp: 28 (JSC::Lexer::isKeyword): 29 * parser/Lexer.h: 30 * runtime/JSGlobalObjectFunctions.cpp: 31 (JSC::globalFuncEval): 32 * runtime/JSONObject.cpp: 33 (JSC::JSONProtoFuncParse): 34 * runtime/LiteralParser.cpp: 35 (JSC::LiteralParser::tryJSONPParse): 36 (JSC::LiteralParser::makeIdentifier): 37 (JSC::LiteralParser::Lexer::lex): 38 (JSC::LiteralParser::Lexer::next): 39 (JSC::isSafeStringCharacter): 40 (JSC::LiteralParser::Lexer::lexString): 41 (JSC::LiteralParser::Lexer::lexNumber): 42 (JSC::LiteralParser::parse): 43 * runtime/LiteralParser.h: 44 (JSC::LiteralParser::LiteralParser): 45 (JSC::LiteralParser::tryLiteralParse): 46 (JSC::LiteralParser::Lexer::Lexer): 47 1 48 2011-06-17 Geoffrey Garen <[email protected]> 2 49
Note:
See TracChangeset
for help on using the changeset viewer.