Description
Describe the bug
Under Mac Chrome, the official demo blocks the browser for up to 3 seconds.
To Reproduce
You can reproduce this problem by opening the official web page.
When you open the official page, a lag occurs for a few seconds, during which any action of the browser hangs, including switching tabs. this lag time seems to increase with the complexity of the shader. In my own application, which has about 10 shaders, this lag time lasts 30 seconds or more, reaching a state that is completely unacceptable to the user.
I tried some modifications using KHR_parallel_shader_compile, which reduced the time for js execution in the Flame Graph, but still blocked the UI. using off-screen canvas rendering did not improve anything either.
This problem does not occur on windows.
It seems that only filament has this kind of blocking, threejs or other webgl-based engines do not have this problem.
Expected behavior
The behavior of mac should be the same as windows.
Screenshots
trace using chrome trace event profiling tool, It seems to be blocking on the CommandBufferProxylmpl::WaitForGetOffset
method
Desktop (please complete the following information):
- Device: Retina 5K, 27-inch, 2017
- OS: [Mac OSX 13.2.1 (22D68)]
- Browser: [Chrome version 110.0.5481.177 (x86_64)]
- GPU: [Radeon Pro 580 8 GB]
- Backend: [WebGL(using OpenGL backend in Chrome settings)]