CookieMonsterTeam / CookieMonster

Addon for Cookie Clicker that offers a wide range of tools and statistics to enhance the game
MIT License
491 stars 204 forks source link

High GPU Usage #920

Open wpmichel opened 3 years ago

wpmichel commented 3 years ago

I have noticed that when I run the addon, my 3070 gets pinned to max and throttles other applications using the GPU. Is this addon supposed to be hardware accelerated? If so, can I configure it to be CPU bound to free up my GPU?

I am using FireFox

image

DanielNoord commented 3 years ago

Oh wow. Is this only with the add-on on? Or also with base cookie clicker?

I have no idea why this would be the case. I have no idea how to start hardware acceleration from javascript (or any language for that matter). Perhaps others have an idea about why this might be happening?

wpmichel commented 3 years ago

This is with both running, through I dont see the spike until loading the addon.

I tried turning off FireFox hardware acceleration and that helped (though minorly)

I didnt think that browsers would have access to GPUs, and I cant imagine that the render requirement is that high.

Perhaps its related to that Javascript 'Game' object referenced in the helper bookmark?

DanielNoord commented 3 years ago

The Game object is created by cookie clicker itself. It basically contains all code of the game.

Do you know how to do profiler snapshot? Perhaps that shows a function taking considerable time on your system. Another (recurring) problem is the memory usage of CM, but I don't know if that would affect GPU acceleration?

wpmichel commented 3 years ago

Im not familiar with profiler snapshot. Can you point me to it? Is part of the developer tooling?

DanielNoord commented 3 years ago

Yes! Open the developer tooling within Chrome (or any Chromium based browser), click on Performance, click on Record (the red button), click some things within the site, click stop recording and click save recording.

See also here