I was just wondering whether there are any known techniques / low hanging fruit for performance gains in Electron?
I’m building an editor for ink - basically a simple text editor / IDE. When viewing the Timeline during load, I see the following on a Mid-2014 MacBook Pro 13":
As you can see, the load time is around 0.85s. It’s certainly not terrible, but it also doesn’t feel particularly snappy! In case you’re wondering the details of what’s on that timeline:
- Between 400ms and 500ms, that’s loading Ace, the code editor.
- Between 500ms and 800ms, that appears to be one big hierarchical
require(), for all the main renderer code (basically, my
renderer.js). I haven’t written a vast quantity of code myself, and my dependencies are
- I believe the final “major chunk” around 800ms is loading jQuery.
This is my first Electron project, and I’m not very experienced with node.js either, so I’m wondering if there are any easy wins I can try? Is there anything special that happens/can happen when I run the electron packager to run in “production” v.s. “debug” etc? Or a way of somehow pre-compiling dependencies etc?