Node.js Electron Applications for Single Core Windows 7 machines are slow on file I/O Node.js Electron Applications for Single Core Windows 7 machines are slow on file I/O windows windows

Node.js Electron Applications for Single Core Windows 7 machines are slow on file I/O


Electron does not handle task like that well in the main process. Electron is also not multi-threaded.

Even though you are running single core, I would recommend using node's "child_process" to run file read/writes(or any heavy task for that matter) outside of electron's main process. This should solve any strange hiccups or stutters in the app and generally does speed things up.

Also keep in mind that electron is based on chrome and node is based on v8 which is chrome's core. These things combined make electron very resource intensive by nature and performance is generally the downside of electron. The upside obviously being able to quickly create cross platform apps. A 1 core machine just overall is probably not well suited to run even 1 electron app. We haven't had 1 core machines in what? 10 years?


This is reminiscent of this issue and others that I have seen.

require("fs") in an Electron app doesn't actually get you Node's fs module. It uses another version of fs provided by Electron. The recommendation from the Electron team is to use require("original-fs") when doing file operations.

There is an open issue to document this:

Electron modifies the fs module directly to support ASAR files, this can be a performance burden for use cases that do not require ASAR support however and to support those use cases the "original" fs module is available under require('original-fs').

I would try using original-fs if you're experiencing slowdown.