Opened 9 years ago

Closed 9 years ago

#11603 closed defect (invalid)

ProgressBar: memory leak when using determinate and undeterminate buttons

Reported by: Roberto Mosqueda Owned by:
Priority: high Milestone: tbd
Component: Dijit Version: 1.5
Keywords: memory leak Cc: David Schwartz, tmayeur@…, hwcdl@…, haysmark
Blocked By: Blocking:

Description (last modified by bill)

Testing Type: Memory leaks

Widget: dijit.ProgressBar

Short description: Memory level increases when using determinate and undeterminate buttons. Once you reload the site memory level keeps higher.

Browsers affected: Chrome 5

Steps to Reproduce:

  1. Open the file dojo-release-1.5.0/dijit/tests/test_ProgressBar.html with Chrome 5
  1. Start process explorer tool to monitor the memory used by the browser.
  1. Click on Make Indeterminate Button
  2. Click on Make Determinate Button
  1. Repeat step 2 and 3 secuencially 43 times
  1. Press F5 or reload the page.
  1. Repeat step 2 and 3 secuencially 43 times

Actual Result: Memory level is not reduced after refreshing the page

Expected Result: Memory level should get reduced when you refresh

Attachments (1)

ProgressBar.GIF (44.0 KB) - added by Roberto Mosqueda 9 years ago.

Download all attachments as: .zip

Change History (5)

Changed 9 years ago by Roberto Mosqueda

Attachment: ProgressBar.GIF added

comment:1 Changed 9 years ago by bill

Cc: bkeese@… removed
Component: GeneralDijit
Owner: anonymous deleted

comment:2 Changed 9 years ago by bill

Description: modified (diff)
Summary: Memory level increases when using determinate and undeterminate buttonsProgressBar: memory leak when using determinate and undeterminate buttons

comment:3 Changed 9 years ago by Katie Vance

Cc: haysmark added

comment:4 Changed 9 years ago by haysmark

Resolution: invalid
Status: newclosed

I do not think your test case ran long enough to prove that there is a memory leak. Here is my counter example:

var state=false;
function toggle(i){
	if(i<43){
		state=!state;
		dijit.byId('indeterminateBar').set({indeterminate: state, label: ''});
		setTimeout(function(){
			toggle(i+1);
		}, 1);
	}else{
		window.location.href=window.location.href;
	}
}
dojo.addOnLoad(function(){toggle(0);});

You ran Chrome up to 29MB on test_ProgressBar and in fact my experiences is that it flattens right around there on that page. There is no memory leak; the garbage collection is just lazy. The Chrome developers say that Chrome will go as high as 256MB before compacting:

http://code.google.com/p/chromium/issues/detail?id=16821

Note: See TracTickets for help on using tickets.