RESOLVED FIXED 51922
JSON.stringify processing time exponentially grows with size of object
https://bugs.webkit.org/show_bug.cgi?id=51922
Summary JSON.stringify processing time exponentially grows with size of object
Mirko Tschäni
Reported 2011-01-05 05:59:14 PST
Created attachment 77991 [details] Reproduces the bug, open index.html, it will show a report showing the processing time of JSON.stringify calls JSON.stringify is very slow in WebKit (slower than the javascript JSON implementation from http://www.json.org). In addition the processing time grows exponentially to the size of the object that is passed to JSON.stringify. With bigger objects (resulting JSON string 600 kb) the processing time for the native JSON.stringify is more than 100 times bigger than the json.org implementation. Google chrome (as well as firefox and ie8) does not have the problem. There native json is faster than json.org in most of the cases and if it is slower, then only marginally and the processing time is proportional to the size of the object passed to the JSON.stringify function.
Attachments
Reproduces the bug, open index.html, it will show a report showing the processing time of JSON.stringify calls (5.84 KB, application/octet-stream)
2011-01-05 05:59 PST, Mirko Tschäni
no flags
Replacement for: Reproduces the bug, open index.html, it will show a report showing the processing time of JSON.stringify calls (5.84 KB, application/octet-stream)
2011-01-05 06:03 PST, Mirko Tschäni
no flags
Patch (1.50 KB, patch)
2011-01-25 13:03 PST, Oliver Hunt
barraclough: review+
Mirko Tschäni
Comment 1 2011-01-05 06:03:49 PST
Created attachment 77992 [details] Replacement for: Reproduces the bug, open index.html, it will show a report showing the processing time of JSON.stringify calls The first attachment had the test with large objects commented out. Use this attachment to reproduce the bug!
Mark Rowe (bdash)
Comment 2 2011-01-05 06:09:00 PST
Oliver Hunt
Comment 3 2011-01-25 13:03:28 PST
Oliver Hunt
Comment 4 2011-01-25 13:14:15 PST
WebKit Review Bot
Comment 5 2011-01-25 14:06:11 PST
http://trac.webkit.org/changeset/76635 might have broken Leopard Intel Release (Tests)
Note You need to log in before you can comment on or make changes to this bug.