This is a bit difficult to answer, as it depends on many factors.
In general, you can assume that you will get performance close to native apps for the GPU side, as the WebGL graphics API uses your GPU for hardware accelerated rendering - there is just a little overhead for translating WebGL API calls and shaders to your OS graphics API (typically DirectX on Windows or OpenGL on Mac or Linux).
For best performance, set the optimization level to “Fastest” in the Build Player dialog, and set “Exception support” to “None” in the player settings for WebGL.
The Unity profiler is supported in WebGL, see here how to set it up.
If the Run in background is enabled in the WebGL Player Settings, or if you enable Application.runInBackground, then your content will continue to run when the canvas or the browser window loses focus.
However, it should be noted that browsers may throttle content running in background tabs. If the tab with your content is not visible, your content will only be updated once a second in most browsers. Note that this will cause Time.time to progress slower than usual with the default settings, as the default value of Time.maximumDeltaTime is lower than one second.
You may want to run your WebGL content at a lower frame rate in some situations to reduce CPU usage. Like on other platforms, you can use the Application.targetFrameRate API to do so.
When you don’t want to throttle performance, set this API to the default value of –1, rather then to a high value. This allows the browser to adjust the frame rate for the smoothest animation in the browser’s render loop, and may produce better results than Unity trying to do its own main loop timing to match a target frame rate.
Did you find this page useful? Please give it a rating: