Hacker News new | ask | show | jobs
by mromanuk 1917 days ago
Speed is not the problem with JS and Electron, it's the broken UX and expected behavior from a native app.

I've installed it and before moving it to my app folder, I tried to run it (I always do this with new apps). A popup appeared with the title "A JavaScript error occurred in the main process" (weird behavior), I didn't read the content at first, so I closed it and reopened the app again (fast fingers reached cmd-q). Later I read the message asking to move to the App folder first.

1 comments

As an aside, JS does definitely make things feel slower than native in some instances. Regardless, how does generating JS from OCaml make things faster, I wonder?
I think our app is as reactive as a native app despite javascript; if you see any lack of responsiveness I'd be interested in knowing where so I can improve it. I do however agree that it "feels" different on OSX, since you don't have the native animations and look & feel, but I don't think it's related to speed.

Regarding OCaml, using such a strongly typed language enables heavy abstractions without a runtime performance tradeoff, leverages the static optimizer of the OCaml toolchain and outputs optimized javascript (asm like). This is, I would argue, hardly achievable by writing directly plain javascript. Note however that there are other tools that target javascript with similar benefits.