Status: New
Owner: ----

New issue 3925 by [email protected]: JSON.parse leak
https://code.google.com/p/v8/issues/detail?id=3925

Version: <Not sure, problem came from Node.js 0.12.0 and io.js 1.2.0 versions>
OS: <Linux Arch>
Architecture: <x64>

What steps will reproduce the problem?
1. Take Node.js 0.10.36 version and launch following code

var fs = require('fs');
var obj;
fs.readFile('ru.json', 'utf8', function (err, data) {
  if (err) throw err;
  obj = JSON.parse(data);
});

where 'ru.json' is 17.7 Mb file you can find here (https://github.com/Arhangel64/lexic.js/blob/master/dic/ru.json), can't upload it, form didn't provide uploading of files heavier than 10 MB

2. Do the same with Node.js 0.12.0 versoin
3. Compare the time of JSON.parse() execution


we've got
v0.10.36 -  1.1s
v0.12.0   -  33.7s

on ubuntu 12.04

Also JSON.parse allocating around a 1- 1.5 GB of RAM, so, sometimes node crashes with OUT OF MEMORY exeption.


What do you see instead?

https://github.com/creationix/jsonparse

Please use labels and text to provide additional information.

We have a disussion of that problem here (https://github.com/joyent/node/issues/9288#issuecomment-76171417), seems like with io.js the situation is the same.

Thank you for attantion!

--
You received this message because this project is configured to send all issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to