WaitForTargetFPS slowing WebGL to unacceptable levels

I’m trying to build my project for WebGL and I’m having a lot of issues. It currently runs at less than 10 FPS in the build. I click Build and Run and open the profiler for the project to see what’s going on, and 98% of the CPU is being dedicated to “WaitForTargetFPS.”

There’s a ton of empty space below it because the actual code only takes about 5ms per frame. I don’t know why WaitForTargetFPS could be eating up so much.

VSync is disabled in Quality settings for every quality level, and there are no references to Application.targetFrameRate in any of my scripts, so I have no idea why processing power still seems to be spent on VSync.

Some have said it’s because my game takes too long to render frames, but I don’t think that’s the case. I get hundreds of FPS in the editor and no WaitForTargetFPS but only up to 10 in the WebGL build. It also works fine when I build to other platforms.

It’s a really simple platformer game with just some sprites, and even changing the max texture size to 64 doesn’t affect performance, so I think that’s not the issue.

Enabling hardware acceleration in the browser settings helped me.

You are GPU bound. WebGL uses system resources differently than a Standalone app. You’re throwing too much at the GPU it’s hard to tell if Hardware Acceleration is off, or if you’re hitting some other issue on the GPU.

Try also profiling with your web browsers profiling tools and check out this how-to and the guides it links to.

I dont have exact answer…

Thats strange are you sure VSYNC is off? Mybe there is vSync anyway on tryind to pull the frame rate up?
Also try change quality for all platforms to Very low and try again, maybe there are things heavy for webGL.
Or try just to cut out some bits and pieces. Like disable everything apart from main character and run it.

And also what you should try is a deep profiler. There is a button in the middle of the profiler window.
It will show exactly which process is taking long time.

I had the issue with low framerate and deep profiler show exactly whats the problem.

I am sorry but only this advise I have.