Web client performance issues

The OGS web app has some inefficient code causing tons of seemingly unnecessary browser frames, resulting in really high CPU usage. It sustains ~30-40% CPU usage while the game is just sitting there idle, with nothing happening except the clock ticking.

Are the devs aware of this? I’ve worked on high perf web apps and this seems like a mistake that could probably be fixed without too much trouble.

5 Likes

Could be worth sending a pm to @anoek either here or at GitHub

The backend isn’t public yet, but a PM might be the easiest way to have this conversation.

Is this OGS in browser or one of the third-party apps?

1 Like

I’d welcome any patches, all of that is going to be on the front end so it’s all open source!

6 Likes

Oh great question! Sorry I didn’t think of that…

For the threads for the 2 well known apps, see

Android: “Sente - Online GO” App for Android

iOS: Surround — iOS client for OGS

1 Like

How many windows y’all have open?? I never noticed!

normally at least 8 browser tabs over 2 windows (not all OGS)

Yeah if it’s idling high on the game page I suspect we’re overdrawing when the clock updates, and/or when some of the nav items update. Getting to the bottom of that would likely be a really good improvement for a lot of folks.

6 Likes

The issue is related to the notifications menu in the top right corner; the browser Paint event which happens at 60fps points to that as the root, and opening & closing it to dismiss my unread notifications resolves the CPU issue.

I’ve forked the code and will see if I can reproduce it locally to debug further.

image

7 Likes

OK @anoek I’ve proposed a simple fix here: Remove animation which causes constant 60fps repaints by artursapek · Pull Request #1434 · online-go/online-go.com · GitHub

7 Likes

My CPU thanks you. (And wow the notification menu??)

3 Likes

It was buried in the old code… we rarely venture there :stuck_out_tongue: this was a brave adventurer indeed!

2 Likes