GoogleChromeLabs / proxx

A game of proximity
https://proxx.app
Apache License 2.0
1.31k stars 124 forks source link

Poor performance, even on high end computer #432

Closed mnordine closed 5 years ago

mnordine commented 5 years ago

Renders at ~13fps on an iMac 5K 27" Late 2015

Screen Shot 2019-05-08 at 8 46 51 AM

It also runs very slow on my Moto G4 Plus

kosamari commented 5 years ago

thanks for the report! Let's see if we can get this resolved with further optimization of canvas.

on Moto G4, it might run at 30fps, just curious if you see more lag than that??

mnordine commented 5 years ago

It'd def lower than 30fps, but I can't really give you a reliable frame rate, since hooking it up to dev tools slows things down considerably

Here's a pull request that simply disables antialiasing. It doesn't make much visual difference, at least on high-dpi devices, and it can crush performance on mobile devices.

https://github.com/GoogleChromeLabs/proxx/pull/460

surma commented 5 years ago

That's a great find. Thanks for that PR.

I'm not that surprised by the low frame rate on the Moto G4. Those devices we kinda intended to not run with animations. The iMac is surprising tho. I have a. iMac 5k and the game runs flawlessly. I'll investigate.

mnordine commented 5 years ago

Hey @surma, crucially, which iMac?

Mine is a Retina 5K, 27", Late 2015 with AMD Radeon R9 M390 2GB

These are infamous for underpowered GPU with buggy drivers relative to the display they drive.
Still, this game should prob run smooth as silk on it, and disabling antialiasing will prob go a long way.

mnordine commented 5 years ago

I'm not that surprised by the low frame rate on the Moto G4

Actually, I've gotten some fairly complex WebGL content to not only run 60fps on Moto G4, but even on my Moto E with 2x assets. Anyway, I'm sure you guys didn't intend to support every device under the sun with this nice little app you have here.

surma commented 5 years ago

I think the Moto G4 should be able to run this too. My hunch is that the nebula I wrote is actually a bad idea. I'll look into it :)

surma commented 5 years ago

I think the Moto G4 should be able to run this too. My hunch is that the nebula I wrote is actually a bad idea. I'll look into it :)

mnordine commented 5 years ago

Wondering if the "performance happy path" would be compositing those "nebula" circles with CSS blending modes under a transparent canvas?

jakearchibald commented 5 years ago

https://proxx.app/?no-cache - we've released a new version with some performance tweaks. Any better?

mnordine commented 5 years ago

Rock solid 60 fps on my iMac now:

fps

Should still disable alpha on "nebula" canvas context.

Btw, I used this awesome squoosh app for the above screenshot...

mnordine commented 5 years ago

Seems much smoother on my Moto G4 as well

jakearchibald commented 5 years ago

Brilliant! Thanks for pointing us in the right direction @mnordine!