In our project, we need to use custom electron dialog windows, that have really fast opening time.
- I tried the dialog module (in electron), but there’s no way to edit it, although the time it takes to open the window is really fast.
- Then, I made a modal window (using BrowserWindow) and made it act as a dialog when needed. This worked in a way as we were able to customize it however we want. But, the major issue is that it takes about 3-4 seconds to open a new modal window (worse if PC’s performance is bad). This time consumption is causing a lot of issues as we have parts in the project where the user needs to notified instantly (errors and confirmations).
- As another solution, I started creating a modal window at a very initial stage, then hide it and show it to the user (with updated contents using React states and props) whenever needed. This worked, however, since the application is already quite heavy, adding and keeping another Electron window open since the beginning is consuming a lot of memory.
- I have used multiple packages as well, but all have the same time issue.
As of now, I have tried these solutions but all have bad parts that we are trying to majorly avoid.
I am trying to achieve the best possible way to handle these windows, which would be: opens really fast (<1s), is custom and less memory consumption.
Have I exhausted all my options? Or, is there any other way I can go about this problem.
Any help would be appreciated.