Niche issue! Lag when using Tint Screen through a VM. Options?

So, this one's gonna be a bit odd! I'm running RPG Maker MV through a Parallels Virtual Machine on a MacBook Air M1. I only do this because the official Mac version crashes at complete random when play testing, and I got a bit sick of it. Meanwhile, the Windows version runs flawlessly! Hence, virtual machine setup. It works fine, the only issue: As soon as I activate a Tint Screen effect, the FPS tanks to 10-15.

I feel like this can be explained away as "Well, you're running it through a VM, of course it's gonna lag", but I can run Overwatch on this thing with a solid 40-50FPS, so I don't see why a little coloured rectangle on my 2D game is causing me these issues. 😛

To cross off what I'm doing, it's a parallel event that just goes to the "Night" preset, and then erases event. I've also tried Autorun - same result. The game seems to be running in Canvas mode, which I know is less than optimal. If I force WebGL the average FPS tanks to 20-25, but at least it stays there when the Tint Screen effect is used. For reference the effect works just fine in the MacOS version, but it took me 3 crashes on launch to test that out.

Sidenote, whether effects run just fine, as do animations. It seems to just be Tint Screen making a fuss.

So either if someone has an idea of how to fix this or an alternative potential plugin that does something similar, that'd be great! 😀
Please show a screenshot of your event - full event window. And any other events (on map or common events) that are set to parallel process that would be running at the time.

The only time I've seen Tint Screen cause lag is when it was on a parallel process event that wasn't erased. You say yours is, but I'm thinking there's still a parallel process event running somewhere.

To confirm, you could change your parallel process event to Action Button, give it a sprite, and then interact with it and see what happens.
Please show a screenshot of your event - full event window. And any other events (on map or common events) that are set to parallel process that would be running at the time.

The only time I've seen Tint Screen cause lag is when it was on a parallel process event that wasn't erased. You say yours is, but I'm thinking there's still a parallel process event running somewhere.

To confirm, you could change your parallel process event to Action Button, give it a sprite, and then interact with it and see what happens.
There are no other parallel processes running in the scene. All the other events are triggered by Action Button. I've tried this on a fully blank maps as well with only the single parallel event.

Here's what the event looks like. Making it an Action Button with a sprite results in the same lag. The sprite disappears as you'd expect after it reaches Erase Event.
Get rid of the wait on the Tint Screen, and the Wait command below it.

Just tint screen (with no wait) followed by Erase Event.

Does it make a difference?
Get rid of the wait on the Tint Screen, and the Wait command below it.

Just tint screen (with no wait) followed by Erase Event.

Does it make a difference?
Nope, tried that before. Still lags.
can you describe the lag a bit better?
there are many causes of lag, and especially with waits you can easily mistake two different effects:
waits on parallels should reduce the lag by having the parallel loop less often than sixty times per second, but if you add too many waits the "lag" actually comes from the delay in waiting for the next loop of the parallel.

that is unlikely here because of the erase event, but a better description of the lag might still help in pinpointing an alternative cause.
can you describe the lag a bit better?
there are many causes of lag, and especially with waits you can easily mistake two different effects:
waits on parallels should reduce the lag by having the parallel loop less often than sixty times per second, but if you add too many waits the "lag" actually comes from the delay in waiting for the next loop of the parallel.

that is unlikely here because of the erase event, but a better description of the lag might still help in pinpointing an alternative cause.
I clarify exactly what kind of lag in the almost excessively detailed OP, but I'll say again - it's frame rate lag. Not "delay" lag. As soon as the Tint Screen effect begins, the frame rate tanks to 10-15fps and stays there.
As I said that was only an example, because there are many more causes of lag.
and that is especially true for frame rate lag that can have multiple different causes.

In fact the only way a tint screen can cause frame lag is if the display driver is rather badly programmed.
because once the event is erased, there is nothing left in the game_interpreter to cause processing lag.
which means the cause is either something entirely independent, or the implementation of the display functions (which is outside the responsibility of the RPG Maker) causes this problem.
As I said that was only an example, because there are many more causes of lag.
and that is especially true for frame rate lag that can have multiple different causes.

In fact the only way a tint screen can cause frame lag is if the display driver is rather badly programmed.
because once the event is erased, there is nothing left in the game_interpreter to cause processing lag.
which means the cause is either something entirely independent, or the implementation of the display functions (which is outside the responsibility of the RPG Maker) causes this problem.
Alright, so then it's likely because it's being ran through a Virtual Machine then. I still think that's a bit silly since I can run heavy-duty AAA titles through it without a hitch but a slightly color-tinted rectangle apparently shakes the whole RPG Maker engine to its core.

Another theory is that it's not the VM that's am issue but rather the OS architecture. Because the MacBook Air M1 is Apple Silicon, the only possible Windows install to run is Windows 11 ARM, aka ARM-based windows as opposed to X86/64. And given the crashing I get on the native MacOS version, perhaps RPG Maker MV just isn't equipped to do ARM processing?

Like I said, this IS a very niche scenario.
Or it might be the display chip.
I read somewhere that the newer Mac hardware no longer supports WebGL, forcing the engine into the slower canvas mode. If that clashes with whatever the VM does (for example if the windows of the VM assumes WebGL is still operational) that can also explain some slowdown there.
M1 macs are ARM processors, which MV wasn't designed or updated (afaik) to run on mac's that use ARMs and there are a lot of issues with them. Additionally, from my own experience trying to run MV playtests through a Linux VM a while back, VM performance can be surprisingly bad with MV (I was getting like 3 fps on a Ryzen 1700).

All that being said, it is extremely odd that this slowdown is only happening with a tint screen event. Could you try making a new map (oddly enough, I've had some odd issues that only happen on certain maps in the past, where I've literally made a copy of a map and the same issue doesn't present itself on the copy) with only a action press trigger event that JUST tints the screen, with no erase event or wait?

Also, we'd need to know if you had any plugins related to screen tint (for example, community lighting/terrax lighting) that could tie into the call?

Oh, and try opening the console during the framerate tanking (f8) to check if there aren't any errors happening.
Or it might be the display chip.
I read somewhere that the newer Mac hardware no longer supports WebGL, forcing the engine into the slower canvas mode. If that clashes with whatever the VM does (for example if the windows of the VM assumes WebGL is still operational) that can also explain some slowdown there.
I wouldn't be so sure. It's true WebGL (and OpenGL as a whole) was scrapped support-wise in the M1 chips but the Rosetta 2 translation layer has proven more than capable to handle rendering and processing, often handling it better than its Intel/AMD counterparts. Like I said, I can run AAA games with little to no issues through that translation layer (or in WINE/VM environments like Crossover/Parallels).
Furthermore like I mentioned, the native MacOS version of MV handles Tint Screen just fine, in WebGL mode. Pushes full 75 FPS (which is the max refresh rate of my monitor). The Virtual Machine defaults to Canvas Mode which sits happily at 60 FPS until Tint Screen turns on, where it drops to 10-15FPS. If I force WebGL mode in the VM, it sits at a steady 20-25FPS regardless of the effect.

So I wouldn't say the M1 chip is the issue. The native client runs smooth as butter. It's the VM one that has lag issues. And the only reason I looked at using a VM is because the native client crashes at absolute random.
M1 macs are ARM processors, which MV wasn't designed or updated (afaik) to run on mac's that use ARMs and there are a lot of issues with them. Additionally, from my own experience trying to run MV playtests through a Linux VM a while back, VM performance can be surprisingly bad with MV (I was getting like 3 fps on a Ryzen 1700).

All that being said, it is extremely odd that this slowdown is only happening with a tint screen event. Could you try making a new map (oddly enough, I've had some odd issues that only happen on certain maps in the past, where I've literally made a copy of a map and the same issue doesn't present itself on the copy) with only a action press trigger event that JUST tints the screen, with no erase event or wait?

Also, we'd need to know if you had any plugins related to screen tint (for example, community lighting/terrax lighting) that could tie into the call?

Oh, and try opening the console during the framerate tanking (f8) to check if there aren't any errors happening.
I've tried it on empty maps, copies of maps, during this project, starting new projects. It's consistent. As soon as Tint Screen starts, the frame rate tanks. I know it's not plugin-related because I've tried this with every plugin disabled, even the ones that come default. Same result.

Console doesn't output anything whatsoever. It's completely blank.
Screenshot 2021-12-28 at 18.01.43.png

Original thread: https://forums.rpgmakerweb.com/threads/niche-issue-lag-when-using-tint-screen-through-a-vm-options.143356/