nw.js icon indicating copy to clipboard operation
nw.js copied to clipboard

nwjs Helper taking 100% of CPU on Mac

Open MichalMisiaszek opened this issue 7 years ago • 21 comments

NW version: nw.js v0.14.5 Node v5.11.1 Chromium 50.0.2661.102 commit hash: 93c8021-3478215-2a9e6e1-5a26102

OS version: 14.5.0 Darwin Kernel Version 14.5.0: Mon Jan 11 18:48:35 PST 2016; root:xnu-2782.50.2~1/RELEASE_X86_64 x86_64

And app doing some drawing taking 100% CPU. I experience similar problems with Chrome browser itself. Seems as common problem on MacOS.

screen shot 2016-07-25 at 8 31 31 pm

MichalMisiaszek avatar Jul 26 '16 03:07 MichalMisiaszek

@MichalMisiaszek Do you have a sample app to reproduce this issue?

ghostoy avatar Jul 29 '16 04:07 ghostoy

@MichalMisiaszek are you running osx sierra? does the 100% CPU happens when you close the app ?

jtg-gg avatar Jul 29 '16 04:07 jtg-gg

Hello, I cannot share my app unfortunately. If I close it it is OK. I believe problem is with Chrome itself as I have similar case using Chrome on my Mac. I am running Yosemite. And again it does not ALWAYS happen :(. Regards

MichalMisiaszek avatar Jul 29 '16 16:07 MichalMisiaszek

Getting this problem too. If I force-quit the application, the nwjs helper stays behind in memory.

applebya avatar Aug 02 '16 02:08 applebya

^

on osx 10.11.6 with nw 0.14.6-sdk, 0.14.7-sdk and 0.16.0-sdk, nwjs helper remains running after closing the app, and gradually consumes more and more cpu. have to force quit it.

have not seen it on the production build of nw yet, nor do i see same behaviour with chrome browser

conceptualspace avatar Aug 04 '16 02:08 conceptualspace

in our case we isolated this to the use of fs.watch (via chokidar wrapper)

conceptualspace avatar Aug 12 '16 15:08 conceptualspace

Any update on this? One app I use that bundles nwjs hits this basically every time.

virusdave avatar Jun 20 '17 02:06 virusdave

Please provide a sample so we can reproduce it.

rogerwang avatar Jun 20 '17 02:06 rogerwang

Happy to. What/How exactly do you want me to do this?

virusdave avatar Jun 20 '17 02:06 virusdave

if you meant sample app, it happens using the current version of PopcornTime.sh on my macbook, basically every time.

virusdave avatar Jun 20 '17 02:06 virusdave

CC @Christywl

rogerwang avatar Jun 20 '17 02:06 rogerwang

I try PopcornTime.sh 0.3.10 on Mac, the CPU usage(not 100%): image

image

Similar issue #4508.

Christywl avatar Jun 20 '17 06:06 Christywl

This happens with near 100% reliability on latest PT on both my and my wife's laptops. We typically are chromecasting, so perhaps this makes a difference?

Incidentally, i rebuilt PT locally from source last night, after upgrading the nwjs dependency to a more recent version, and i haven't seen the behavior since. I'll update here if it reoccurs.

 -dave

On Tue, Jun 20, 2017 at 2:10 AM, Christywl [email protected] wrote:

I try PopcornTime.sh 0.3.10 on Mac, the CPU usage(not 100%): [image: image] https://user-images.githubusercontent.com/20039821/27318945-7ce0fafc-55c1-11e7-8c37-45b28905403c.png

[image: image] https://user-images.githubusercontent.com/20039821/27318961-96451dd4-55c1-11e7-9c64-6ab1295270ac.png

Similar issue #4508 https://github.com/nwjs/nw.js/issues/4508.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/nwjs/nw.js/issues/5152#issuecomment-309654328, or mute the thread https://github.com/notifications/unsubscribe-auth/AF3Qr2P2JBrflrndA02YzgswkNCQlPR8ks5sF2JbgaJpZM4JUwWX .

virusdave avatar Jun 20 '17 15:06 virusdave

same here, osx high sierra, chromecast as well

ldanicel avatar Oct 08 '17 16:10 ldanicel

I double check with PT 0.3.10 on Mac, can reproduce this issue now, it mostly consumes 70%~95% CPU, sometimes it takes >100% CPU. screen shot 2017-10-11 at 12 10 33 pm

Christywl avatar Oct 11 '17 04:10 Christywl

This could be an issue in PT. Could someone come up with a minimal reproducible case?

rogerwang avatar Oct 17 '17 04:10 rogerwang

I am experiencing this, while testing an app that it seems it is made with nwjs (https://pinegrow.com/)

leolara avatar Oct 04 '18 12:10 leolara

same issue with macbook m1, somehow this process appeared in the "Active Monitor" and used 110% CPU

lebed2045 avatar Aug 24 '21 10:08 lebed2045

@lebed2045 Same here. I was wondering why my MacBook Pro M1 was getting so hard and burning through batter faster than it should while just doing very basic web development (VS Code, PHP, FireFox, etc). I force quite the process and my Mac has cooled back down now.

lukebouch avatar Dec 28 '21 02:12 lukebouch

i run the zimbra desktop program, when zimbra desktop is closed. and NWJS closed.. :-)

kangpaidjo avatar Jan 20 '22 07:01 kangpaidjo

The problem seems to be most prominent in <webview> tag.

How to reproduce

main.html

<!doctype html>
<html lang="en">
<head>
	<meta charset="utf-8">
	<title>Demo</title>
	<style>
		body, webview { width: 100vw; height: 100vh;}
	</style>
</head>
<body>
	<webview src="https://maps.google.com" partition="persist:demosite"></webview>
</body>
</html>

package.json

{
	"main": "/main.html",
	"name": "demo",
	"nodejs": "false",
	"chromium-args": "--enable-spell-checking"
}

During loading, zooming in, zooming out nwjs Helper (Renderer) consumes up to 70% of CPU.

Sunvas avatar Sep 10 '22 19:09 Sunvas