Electron UI BrowserWindow freezes my main UI BrowserWindow


Code reference: https://github.com/aredfox/screencapturer

Problem description: Here is an electron app with a “MainWindow” that holds a button “Start capture”. Once clicked it fires an event to the main process, the main process then launches a new, seperate, “BrowserWindow” object called ‘captureWindow’ with it’s own capture.html and capture.js associated. In capture.js, every three seconds a screenshot is made and saved to c:\temp\screencap (this is a demo app to illustrate a problem, thus I did not make this configurable and hard coded the path in for now). Every time a capture is made in the ‘craptureWindow’ it freezes, which I expected it to. But, the ‘mainWindow’ object freezes as well, which I did not expect it to do. How should I handle this, so that the mainWindow does not freeze when a process is being run in another “BrowserWindow” object? I assumed electron BrowserWindows (or “tabs”) had a seperate thread?

How do I make intensive computation in main process with renderer unaffected by it [SOLVED]

@aredfox do you get any solution for this problem?