Multiple Game Processes in Task Manager

Whether I test play from the editor, or launch a deployed game, I noticed there are multiple instances of Game.exe within task manager. This even happens on minimum bare-bones projects and looks something like this.

ZrLCPFQ.png


Windows 10, while not pictured here, will list the duplicates as "background processes".

My question is, what are the extra processes doing and why are they there? I usually prefer knowing as much as I can about what's going on behind the scenes wherever possible in the event I need to optimize, but I couldn't see anything related to this in the MV source code or any answers to this on the internet.

Much appreciated.
Only a guess, but they could be for audio.
You might be right, but I'm curious what led you to guess that.
I'm following a Udemy course on a particular programming language / engine, and one of the lessons talked about processes and threads, and mentioned that media players often use multiple processes. I really don't know if that applies here - it's playing media, but it's not a media player (there's no UI/dashboard).

One way you might find out is by trying to kill one process at a time from the task manager. If it doesn't kill the lot, or make your game crash, you might see something stop working.

The other thing you could do, which would be more accurate, but too time-consuming for me to attempt, is to go through the scripts and see where additional processes might be launched, and what they're for.
Talking with a friend today, I managed to get a rough idea of what the processes basically are after some bouncing back and fourth.

MV as we know is HTML5/JS based and uses Node.JS to package the deployed projects into executable files (any OS) which is really just a wrapper for a custom version of the chromium browser (open source chrome) that the games run inside of. Basically MV uses the Chromium Embedded Framework or CEF which will basically treat applications in a similar manner chrome does where it uses multiple processes for keeping track of each web page and application (each tab is usually its own process unless same domain). You can see this effect with applications like Spotify to (which both it and MV are listed on that page).

We could essentially say that MV games live on top of JS which then live on top of PIXI which then live on top of CEF which is what acts as the JS interpreter and game renderer. If I had to guess, the big memory hog process is probably what controls the majority of JS interpreting and tidying up resources (garbage collection).

That said, this basically means most MV games will have most of their resource footprint come from the CEF itself unless you have a TON of assets (way way more than the RTP). I believe MV will keep all assets loaded in memory until game exit as it can't predict when it will need them again, but most games this is probably trivial compared to the resources the CEF needs just to run. As most users have a machine with at least a gig of memory these days, this I guess isn't that big of a deal and most bottlenecks in MV will come from CPU/GPU issues which is within control of the developer in MV.

I could possibly be wrong about somethings though so anyone who is willing to correct me, feel free to do so. I do know if one of my players possibly asked why so many processes, the worst answer I could give them as a developer is "I don't know" as that just says I don't know what my game is doing or why which looks really bad.

Original thread: https://forums.rpgmakerweb.com/threads/multiple-game-processes-in-task-manager.84818/