Copy link to clipboard
Copied
Since google implemented its new Heavy Ads Intervention mechanism that removes ads after 15+ seconds of using device resources im getting hard time avoiding it (especially on mobile devices but on desktop chrome's tabs in background aswell).
I have already started using only 14seconds of motion, after which im stopping all animations.
Yet, even tho CPU usage generated by browser with my ad drops after these 14 seconds (i can only guess that my canvas stopped using CPU - cant confirm that cause i can measure only whole browser process' hardware usage), the GPU usage is still high on bigger formats even if there is nothing going on in there.
I tryied everything, including some "hacky" codes to change fps to 0 along with usuall stops in keyframes.
No matter what, whenever that bigger format canvas was on screen, GPU was used heavily and i wonder why is that so, if nothing is animating anymore? Why is it taxing my high-end gpu so heavily for no reason? In before potential suggestions: Yes, i have made sure the GPU usage increases exactly at the moment when that bigger format canvas exported from Animate is on screen even after its stopped.
Is there a chance to completly freeze the canvas so it stop using both CPU and GPU and behave like a static image on it's stopped frame?
Perhaps some code to implement that would make canvas stop redrawing or something? Im pretty green in technical aspects of how the canvas actually works.
Copy link to clipboard
Copied
i'd just take a screenshot of the last frame and replace the entire canvas with an html the includes whatever clicktags you need, links and that image.
addendum: that might not be enough. you may need to remove the script tags too.
Copy link to clipboard
Copied
Yeah i was thinking of such easy workaround, but thats another load of KBs on top of animated html, where in ad campaigns KBs are always very limited, which woudl result in greatly reduced quality of the ad itself, so its a no-go. I am looking for someone who knows how the canvases works to say if its technically possible to make it keep one drawn frame without what looks like redrawing static canvas over and over again.
If its impossible with canvas and javascript i believe future belongs to editors that will export CSS based animations, which are much lighter, and wont waste resources and power (and conservation of these two seems to be trend that wont end quickly, if ever).
Copy link to clipboard
Copied
OMG, this is incredible. It worked like a charm. BAM - 0% cpu and gpu after using:
this.stop();
createjs.Ticker.reset();
at the frame its stopping. It still scales on responsive ads, it just stopped needless use of resourced to keep chewing hardware after stopping.
This should be implemented in Animate somewhere so much. Especially now with these Heavy Ads Intervention mechanic in Chromes (and possible mimicking it in other browsers soon)
Thank you very much Flexercised!