Opened 11 years ago

Closed 10 years ago

Last modified 10 years ago

#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)

test2.html (1.8 KB) - added by denov 11 years ago.
test to show memory leak
test_data_grid_leak.html (1.6 KB) - added by Bryan Forbes 11 years ago.

Download all attachments as: .zip

Change History (11)

Changed 11 years ago by denov

Attachment: test2.html added

test to show memory leak

comment:1 Changed 11 years ago by Bryan Forbes

Milestone: tbd1.2.1

Changed 11 years ago by Bryan Forbes

Attachment: test_data_grid_leak.html added

comment:2 Changed 11 years ago by Bryan Forbes

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 11 years ago by denov

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 11 years ago by Adam Peller

Milestone: 1.2.11.2.2

comment:5 Changed 11 years ago by Adam Peller

Milestone: 1.2.21.3

comment:6 Changed 10 years ago by Nathan Toone

Owner: changed from Bryan Forbes to Nathan Toone

Reassigning to me

comment:7 Changed 10 years ago by Nathan Toone

Milestone: 1.3future

comment:8 Changed 10 years ago by Nathan Toone

Resolution: fixed
Status: newclosed

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 10 years ago by Nathan Toone

Milestone: future1.4
Note: See TracTickets for help on using tickets.