I started a new project and noticed a weird performance problem. The larger my game window, the lower the framerate, even though the profiler says that everything is the same.
To test, I created a new project with the “Empty Project” template, and only added a single script getting input to toggle the profiler or quit. For some reason vsync is waiting longer and longer based on the window size. I tried with vsync enabled and disabled in game.project, the result is essentially the same. It’s the same if I build from the editor or run a bundle.
As you can see, Engine.Sim and Profile.Draw stay the same, but the total actual frame time goes up and up. Is there something that could be taking up a lot of time that the profiler doesn’t show?
If I “Build HTML5” with vsync off, this is what the profiler says (no matter the size), but the actual FPS is about 40 at 960x640 and 30-35 fullscreen at 1600x900.
@britzl OK, I tried the web profiler too, but it gives the same results.
void glfwSwapBuffers ( GLFWwindow * window )
This function swaps the front and back buffers of the specified window. If the swap interval is greater than zero, the GPU driver waits the specified number of screen updates before swapping the buffers. - from the GLFW docs
Is it possible that it’s getting a weird interval?