Skip to content
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

Very basic input typing causes nodes count to increase #1

Closed
tenbits opened this issue Jul 17, 2015 · 7 comments
Closed

Very basic input typing causes nodes count to increase #1

tenbits opened this issue Jul 17, 2015 · 7 comments

Comments

@tenbits
Copy link

tenbits commented Jul 17, 2015

Hi Sam,

I was playing around with the module, and stumbled a leak of nodes no one can explain. Do you have any ideas about?
Consider this template (https://github.com/tenbits/leaky/blob/master/test/input/index.html) and the runner (https://github.com/tenbits/leaky/blob/master/test/input/index.js).
As you can see, we just type a word into the input and clean it on enter. Every iteration causes 1 node-leak on e.target.value = str_EMPTY;

Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.134 Safari/537.36
{"documents":1,"jsEventListeners":1,"jsHeapSizeUsed":1231344,"nodes":13}
{"documents":1,"jsEventListeners":1,"jsHeapSizeUsed":1732484,"nodes":23}
Iterations: 10, Leaks: 10
Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2457.0 Safari/537.36
{"documents":1,"jsEventListeners":1,"jsHeapSizeUsed":2101496,"nodes":13}
{"documents":1,"jsEventListeners":1,"jsHeapSizeUsed":2897152,"nodes":23}
Iterations: 10, Leaks: 10

When we try manually to test the page directly via the DevTools, we get the same result, so it seems to be the browser engine issue.

image

type foo; press enter; type baz; press enter; type qux; press enter; gc; stop;

I was just thinking how reliable is the nodes-count?

Thanks, Alex

@samccone
Copy link
Owner

hey @tenbits I think there may be an issue in chrome 43 at the moment, can you try in chrome 45?

@tenbits
Copy link
Author

tenbits commented Jul 17, 2015

Sam, I have tested also in Canary 46 - also results with extra 10(LOOP_COUNT) nodes (

@samccone
Copy link
Owner

dang, ok I will take a dive into this this afternoon, thanks for digging in, if we verify that this is a bug in chrome, we should elevate it to the chromium tracker

samccone added a commit that referenced this issue Jul 17, 2015
@samccone
Copy link
Owner

hey @tenbits I added a basic input test, let me know what you think and how you think I can bring this inline with your hypothesis

@samccone
Copy link
Owner

samccone commented Aug 1, 2015

@tenbits
Copy link
Author

tenbits commented Aug 2, 2015

Hi Sam, that's why I think this is a very useful tool. Thanks for doing this. With it we can ensure our applications have no memory leaks, and also the browsers do not introduce any. Hope, this will be fixed soon)

@samccone
Copy link
Owner

Closing this issue because it is a non-issue in chrome and works as intended... I am going to follow up with a new ticket that will contain some mitigation strategies for this "issue".

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

No branches or pull requests

2 participants