Monday, 12 June 2017

Node.js & Electron: Where to require several modules?

Requiring 5-10 modules in a render process window takes about 5 seconds to render that window, although the window is already visible. I understand that require is also synchronous.

Therefore, is there a way to:

  1. make this asynchronous, or
  2. require these modules globally for current and new windows, or
  3. call these via ipc from main.js if this is faster?, or
  4. make this faster more practically?


via user1679669

No comments:

Post a Comment