Account Options

  1. Sign in
The old Google Groups will be going away soon.
Switch to the new Google Groups.
Google Groups Home for chromium.org
« Groups Home
WebWorker consuming memory incrementing continually
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  3 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Html5Coder  
View profile  
 More options Mar 26 2010, 1:47 am
From: Html5Coder <html5c...@gmail.com>
Date: Thu, 25 Mar 2010 22:47:02 -0700 (PDT)
Local: Fri, Mar 26 2010 1:47 am
Subject: WebWorker consuming memory incrementing continually
Hi,
I am writing some code to setup a basic webworker to test it.
I have a main html page that sets up the worker then the worker sends
back a timestamp to the main page.
This works, however the problem is that if you look at the chrome task
manager the memory for the webworker process continues to increment??
After a period of time when the memory gets large, the worker stops
responding.

Below is the code I am using:

WORKERTEST.HTM
<!DOCTYPE HTML>
<html>
<head>
<title>Worker example</title>
<script>
worker = new Worker('worker.js');
</script>
</head>
 <body>
<div id="results">RESULT</div>
<script>
worker.onmessage = function (event) {
var data = event.data;
document.getElementById('results').innerHTML= data;

};

worker.postMessage();
</script>
</body>
</html>

WORKER.JS
onmessage = function (event) {
setInterval("run()",1);

}

function run(){
response=new Date().getTime();
postMessage(response);

}

Can any explain to me why the web worker continues to increase in
memory size while running?
Is this usual?

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Drew Wilson  
View profile  
 More options Mar 26 2010, 5:02 pm
From: Drew Wilson <atwil...@chromium.org>
Date: Fri, 26 Mar 2010 14:02:22 -0700
Local: Fri, Mar 26 2010 5:02 pm
Subject: Re: [chromium-html5] WebWorker consuming memory incrementing continually

Resending using correct email address this time:

That's not an expected result - can you please log a bug for this at
http://code.google.com/p/chromium/issues/list?

I'm not sure what's going on as there aren't any leaks that we're aware of
in the code path you're executing - it sounds like perhaps GC is not
happening.
If you increase the setInterval() period to something larger (like 100) does
the leak still happen?

-atw


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Html5Coder  
View profile  
 More options Mar 29 2010, 2:34 am
From: Html5Coder <html5c...@gmail.com>
Date: Sun, 28 Mar 2010 23:34:56 -0700 (PDT)
Local: Mon, Mar 29 2010 2:34 am
Subject: Re: WebWorker consuming memory incrementing continually
Thanks, it does look like it is similar to other bugs related to GC
not happening as you suggested.
Have logged bug for this and waiting for response.
This occurs with any setInterval period, was set to 1 to show memory
leak happening quicker.
Thanks

On Mar 27, 8:02 am, Drew Wilson <atwil...@chromium.org> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »