I'm experiencing a lot of framerate loss when exporting to nwjs and, more concerningly, the project is unable to maintain vsync rates despite hitting well over that target framerate when running in unlimited frame modes for testing performance.
I've attached some comparison screenshots below. The three shots are different zones in my game with varying levels of stuff going on. The column on the left is running in the editor (Chrome r317.2) with unlimited frames. The middle column is the nwjs export with unlimited frames while the right column is NWJS with vsync (with a target refresh rate of 165hz). I didn't include a screenshot, but running with vsync from within the editor DOES match the target rate.
As you can see from the pic, even in areas where I'm hitting over 1000 fps, the computer is not able to consistently hit the vsync target, and this only gets worse as the areas get more complex. It becomes really noticeable with camera scrolling, and is causing a jankiness to the camera movement despite the game still running at high frame rates.
Dropping my monitor refresh rate down to 60 still results in missed frames with vsync on, bouncing down to 56-57ish in a lot of areas. Switching monitors on my main PC had no impact, though interestingly, when I launch the game off my old PC I don't get any frame loss with the nwjs build, despite it being a much older system (Intel i5-4560k). I'm wondering if this is an AMD issue (my main PC is a Ryzen 7 5800x, which should be more than enough to handle this).
Not sure if it's worth mentioning, but with unlimited frames, the cpu is the clear bottleneck, with gpu only hitting about 10% usage.
Other things I've tried:
Rolling back Chromium to earlier builds
Running it with the NVpatch
Reinstalling chipset drivers
Making sure graphics card drivers are up to date
I'm at a loss as to what else to try. I had a small amount of users mention that the game suffered occasional performance issues during a closed beta, and now I'm wondering if they were experiencing something similar.
What else can I try?