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

Huge Memory leaks / Heavy Cpu usage #27

Open
Vafarien opened this issue Mar 4, 2014 · 17 comments
Open

Huge Memory leaks / Heavy Cpu usage #27

Vafarien opened this issue Mar 4, 2014 · 17 comments

Comments

@Vafarien
Copy link

Vafarien commented Mar 4, 2014

Your code must have an error, because before it didn't used to use so much CPU
now it spikes and Uses a ton of Page File.
and it becomes one of the most process intensive pages on my system.

Gifs don't happen to load properly because of this, as they seem to skip tons of frames when loaded.

Chrome reports quite a few errors about the page.

@Vafarien
Copy link
Author

Vafarien commented Mar 5, 2014

Failed to load resource: net::ERR_BLOCKED_BY_CLIENT https://engine.4chan-ads.org/ados.js
15
Uncaught TypeError: Cannot read property 'children' of undefined core-compiled.771.js:11
Uncaught TypeError: Cannot read property 'length' of undefined script.js:6626
3
Uncaught TypeError: Cannot read property 'children' of undefined core-compiled.771.js:11
Uncaught TypeError: Cannot read property 'file' of undefined script.js:7900
30
Uncaught TypeError: Cannot read property 'children' of undefined core-compiled.771.js:11
onParsingDone core-compiled.771.js:11
$.event script.js:622
Fourchan.parseThread script.js:11304
(anonymous function) script.js:9499
$.queueTask.execTask script.js:661
Uncaught TypeError: Cannot read property 'file' of undefined script.js:7900
ImageHover.mouseover script.js:7900
17
Uncaught TypeError: Cannot read property 'children' of undefined core-compiled.771.js:11
onParsingDone core-compiled.771.js:11
$.event script.js:622
Fourchan.parseThread script.js:11304
(anonymous function) script.js:9499
$.queueTask.execTask script.js:661

@Spittie
Copy link
Owner

Spittie commented Mar 5, 2014

Chrome?
When it's causing an high load? Both Firefox and Chromium idle all the time for me, even when trying to upload a big image.

@Vafarien
Copy link
Author

Vafarien commented Mar 5, 2014

Chrome, idling on a page over 150 image posts draw an increased 3-5 cpu page file load.
I ask a coder yesterday about whats happening, and he mentions something about an block script that constantly blocking the 4chan ad and causing a ad recheck block loop. which causes a high recheck pagefile.

@Vafarien
Copy link
Author

Vafarien commented Mar 5, 2014

Oh wow, the chrome window that's running the script, that tab alone is taking up over a GB of memory.

@Vafarien
Copy link
Author

Vafarien commented Mar 5, 2014

Failed to load resource: net::ERR_BLOCKED_BY_CLIENT https://engine.4chan-ads.org/ados.js
Uncaught TypeError: Cannot read property 'children' of undefined core-compiled.771.js:11
Uncaught TypeError: Cannot read property 'file' of undefined script.js:7900
5
Uncaught TypeError: Cannot read property 'children' of undefined core-compiled.771.js:11
Uncaught TypeError: Cannot read property 'length' of undefined script.js:6626

@Vafarien
Copy link
Author

Vafarien commented Mar 5, 2014

Tampermonkey started VM1208:106
Failed to load resource: net::ERR_BLOCKED_BY_CLIENT https://engine.4chan-ads.org/ados.js
Uncaught TypeError: Object function (a,b){return new e.fn.init(a,b,h)} has no method 'id' extension-compiled.771.js:11
QR.cloneCaptcha extension-compiled.771.js:11
QR.onCaptchaReady extension-compiled.771.js:11
onCaptchaReady core-compiled.771.js:18
$._finish_widget recaptcha_ajax.js:172
$.challenge_callback recaptcha_ajax.js:166
Uncaught TypeError: Cannot read property 'length' of undefined script.js:6626
QR.captcha.clear script.js:6626
QR.captcha.load script.js:6654
QR.captcha.afterSetup script.js:6580
Uncaught TypeError: Cannot read property 'children' of undefined core-compiled.771.js:11

@Vafarien
Copy link
Author

Vafarien commented Mar 5, 2014

@Spittie
Copy link
Owner

Spittie commented Mar 5, 2014

Do you happen to have image prefetching and the replace options enabled? Because that's the only way I can bring it to use more than 150/200mb of ram for a single tab.
http://a.pomf.se/tnyrqx.png

Also, this started recently? With what version? Because I never touched code that should case such huge memory leaks.

@Vafarien
Copy link
Author

Vafarien commented Mar 5, 2014

@Spittie I don't even have any type of prefetching enabled yet, not even replace.

@Vafarien
Copy link
Author

Vafarien commented Mar 5, 2014

it started in 1.40

@Vafarien
Copy link
Author

Vafarien commented Mar 5, 2014

14% cpu usage on a large thread.

@Vafarien
Copy link
Author

Vafarien commented Mar 5, 2014

I use 1.4.1 4chanX (spitties)
tampermonkey (latests version)
to run a thread poster list script, but the leak isnt either of those because i disabled both and still had high pagefile&cpu usage.

And the only other script i use is OneeChan 5.0.27 but i've never had issues with oneechan itself before.

@Vafarien
Copy link
Author

Vafarien commented Mar 5, 2014

Maybe if 4chan changed somethign in their own code that messed up the script a little?
It coulda thrown something off with Oneechan im not sure, or possibly something in the 4chanX code.

Something like the new captcha fetch, or like earlier mentioned to do with ad banner block re-fetch loop, causing a high page file re-check ever second. throwing a high page error file.
lagging the system over a period of use.
possibly creating a large file to be rendered which would take a lot of CPU to run.

@Spittie
Copy link
Owner

Spittie commented Mar 5, 2014

Ok, I can reproduce when using Chromium + Tampermonkey. But I can reproduce it even when using an older version too. Any particular reason you're using it? There is a .crx for Chrome.
I'm not sure if it's a bug in 4chan X or in Tampermonkey, but since I can't reproduce in Firefox/Chrome, I think it's the latter.

The new captcha shouldn't have anything to do with memory usage, all it need to do is fire a loadRecaptcha event. And I'm not sure what you're referring to with "ad banner block re-fetch loop", since 4chan X doesn't block the ads, and it wouldn't need a loop to block them anyway.

@Vafarien
Copy link
Author

Vafarien commented Mar 5, 2014

I don't need tampermonkey for 4chanX, i just use it for a script that lists current posters in a thread.
I can reproduce the lag without tampermonkey as well.
I did download your crx from your git page.

@Vafarien
Copy link
Author

Vafarien commented Mar 5, 2014

Restarting the browser and clearing the cache seems to be a temporary fix for now.
But in task manager i see it is still using a lot of PF Delta every second

@raymoo69
Copy link

Firefox user here, I have the same problem. Opening a new 4chan page hangs the browser for good 10 minutes. No such problem in Mayhem's version.

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

No branches or pull requests

3 participants