New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#each leaking memory in stache #2332

Closed
imjoshdean opened this Issue Mar 18, 2016 · 3 comments

Comments

Projects
None yet
4 participants
@imjoshdean
Contributor

imjoshdean commented Mar 18, 2016

Discovered that if you have a {{#each}} and iterate on a list that you are constantly moving around or adding and removing items from, it will leak memory. I looked it over with @ccummings and it looks like it might be something in can.view.nodeList.

Example written up here: http://jsbin.com/guzigig/1/edit?html,js,output

Demonstration of increasing memory and DOM nodes:

@imjoshdean imjoshdean added the p0 label Mar 18, 2016

@justinbmeyer justinbmeyer removed the p0 label Mar 18, 2016

@justinbmeyer

This comment has been minimized.

Show comment
Hide comment
@justinbmeyer

justinbmeyer Mar 18, 2016

Contributor

@imjoshdean @ccummings please make a pull request with the JSBin's code as an HTML page in this folder:

https://github.com/canjs/canjs/tree/master/view/stache

https://github.com/canjs/canjs/blob/master/view/stache/visual_benchmark.html is an example of using steal to load CanJS.

This will save me some time getting setup to investigate. Once that's created and I'm done with my morning meetings, I will look into it.

Contributor

justinbmeyer commented Mar 18, 2016

@imjoshdean @ccummings please make a pull request with the JSBin's code as an HTML page in this folder:

https://github.com/canjs/canjs/tree/master/view/stache

https://github.com/canjs/canjs/blob/master/view/stache/visual_benchmark.html is an example of using steal to load CanJS.

This will save me some time getting setup to investigate. Once that's created and I'm done with my morning meetings, I will look into it.

@ccummings

This comment has been minimized.

Show comment
Hide comment
@ccummings

ccummings Mar 18, 2016

Contributor

Example is in #2333

Contributor

ccummings commented Mar 18, 2016

Example is in #2333

@imjoshdean

This comment has been minimized.

Show comment
Hide comment
@imjoshdean

imjoshdean Mar 18, 2016

Contributor

I feel like I should add that I saw this in a customer project that I am currently working on that desperately needs this fix, hence why I added the "Priority" label. I'm going to reapply it and assume it was removed because of the lack of understanding of that.

Also, thank you @ccummings.

Contributor

imjoshdean commented Mar 18, 2016

I feel like I should add that I saw this in a customer project that I am currently working on that desperately needs this fix, hence why I added the "Priority" label. I'm going to reapply it and assume it was removed because of the lack of understanding of that.

Also, thank you @ccummings.

@imjoshdean imjoshdean added the p0 label Mar 18, 2016

@justinbmeyer justinbmeyer self-assigned this Mar 18, 2016

justinbmeyer added a commit that referenced this issue Mar 18, 2016

@justinbmeyer justinbmeyer assigned daffl and unassigned justinbmeyer Mar 18, 2016

@justinbmeyer justinbmeyer added this to the 2.3.21 milestone Mar 18, 2016

@justinbmeyer justinbmeyer added bug fixed in branch and removed p0 labels Mar 18, 2016

@daffl daffl closed this in #2333 Mar 19, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment