#7948 closed defect (fixed)
dojox.DataGrid leaks memory in FF3
Reported by: | denov | Owned by: | Nathan Toone |
---|---|---|---|
Priority: | blocker | Milestone: | 1.4 |
Component: | DojoX Grid | Version: | 1.2.0 |
Keywords: | memory leak | Cc: | |
Blocked By: | Blocking: |
Description
calling grid.update() leaks memory slowly. see attached sample html file. this was ran on FF3.0.3 / XPsp2 fully patched.
Attachments (2)
Change History (11)
Changed 12 years ago by
Attachment: | test2.html added |
---|
comment:1 Changed 12 years ago by
Milestone: | tbd → 1.2.1 |
---|
Changed 12 years ago by
Attachment: | test_data_grid_leak.html added |
---|
comment:2 Changed 12 years ago by
I can reproduce this using the test I attached, but if you bump the interval up to 10 seconds it won't leak. What I don't understand is why you would put the grid on a one second interval to update. Why not use a store with notification?
comment:3 Changed 12 years ago by
i'm still seeing memory leaking with a 10 sec interval with a small store attached to the grid. it's much slower and you have to watch over several hours. my attached test used 1 sec so it would be easier / faster to see the problem.
correct me if i'm wrong on this but i don't think changing the time interval will make any different. memory leaks are caused from thing not being deferenced correctly and the GC not being able to clean them up.
i've done some digging through the DataGrid? code and think i've found where some of the memory is leaking. here's what i've notice.
if you comment out this.views.render();
from _Grid.prerender(); the memory leak stops, at least is very very small.
i think most the leak is coming from the rendering of the grid header in HeaderBuilder.generateHtml()
called via _View.render()
. the grid will still leak by placing if(inMethod != "render") return true;
as the first line in _ViewManager.onEach()
. if i understand the code correctly this if statement will cause only the grid header to get render.
i'm still digging... so i'll let you know what else i find.
comment:4 Changed 12 years ago by
Milestone: | 1.2.1 → 1.2.2 |
---|
comment:5 Changed 12 years ago by
Milestone: | 1.2.2 → 1.3 |
---|
comment:6 Changed 12 years ago by
Owner: | changed from Bryan Forbes to Nathan Toone |
---|
Reassigning to me
comment:7 Changed 12 years ago by
Milestone: | 1.3 → future |
---|
comment:8 Changed 12 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
I am not seeing a leak with the latest from the trunk. Perhaps some of the previous performance improvements have alleviated this issue.
comment:9 Changed 12 years ago by
Milestone: | future → 1.4 |
---|
test to show memory leak