UNCONFIRMED40605
Excessive memory using when communicating with a worker
https://bugs.webkit.org/show_bug.cgi?id=40605
Summary Excessive memory using when communicating with a worker
James
Reported 2010-06-14 19:51:42 PDT
Created attachment 58742 [details] index.html and worker.js to demonstrate the issue using 200,000 'lorem' strings I did a few tests and it looks like simply sending messages between a worker and the thing that created it uses a massive amount of ram, despite the messages not being stored anywhere in JS code. Below are the tests and the memory usage I got from Activity Monitor. I have also attached the code that can replace this. sending messages to the worker only real memory size: 336mb virtual memory size: 5.02mb private memory size: 70.1mb virtual private memory: 309mb sending messages to the worker and the worker sending the same messages back real memory size: 533mb virtual memory size: 5.2gb private memory size: 112mb virtual private memory: 663mb adding strings to an array real memory size: 103mb virtual memory size: 4.79gb private memory size: 58mb virtual private memory: 202mb adding strings to an object real memory size: 128mb virtual memory size: 4.82gb private memory size: 87mb virtual private memory: 262mb
Attachments
index.html and worker.js to demonstrate the issue (1.72 KB, application/zip)
2010-06-14 19:51 PDT, James
no flags
James
Comment 1 2010-06-15 04:32:06 PDT
*replicate
James
Comment 2 2010-07-06 00:05:56 PDT
This looks to actually be an issue with the JSON implementation. I made a small modification to the array test putting JSON.stringify() around the string and my memory usage went up alot: real memory size: 512mb virtual memory size: 5.18gb private memory size: 484mb virtual private memory: 649mb
Note You need to log in before you can comment on or make changes to this bug.