js-dos
js-dos copied to clipboard
High CPU Usage
Much higher than in emularity / em-dosbox. Same in other games.
Intel(R) Core(TM) i5-7400 CPU @ 3.00GHz Chrome 92.0.4515.159 incognito, single clear tab.
archive, 3-7%.
https://archive.org/details/msdos_Supaplex_1991

Dos.zone, 30% flat.
https://dos.zone/rep/my/supaplex-1991%40supaplex.jsdos%3AdyGABtcYCqDrqAMwb5YmXn0pXbH

Same even when I use simple direct calling without ui.
emulators.dosboxDirect(new Uint8Array(bundle));
Correct. This is not a bug, emulation work in worker and trying to utilize 100% of available resources to achieve max performance. Event if you set to emulate 300 cycles it does not matter. Of course it can be changed to sleep/awake behavior but I think it not sense, because usually games want to max cycles. So wan't fix for now.
it's sad, on a mobile it will quickly drain the battery.
Depends on browser. It's not a native code, browser can control how much CPU spend to execute code. However, this affects only very old games, that not require high performance. It can be fixed, but need to do it very accurate to not slowdown the emulator.