r/Python • • Jul 29 '18

Found it funny ;)

Post image
1.6k Upvotes

147 comments sorted by

View all comments

Show parent comments

3

u/EvermoreWithYou Jul 29 '18

Programing novice/idiot here - why is Electron so badly optimised. Is there no way to go around this?

23

u/[deleted] Jul 29 '18

It’s not badly optimized its just like using a dump truck to go get groceries. Sure it works but is it the best tool for the job?

3

u/EvermoreWithYou Jul 29 '18

From what I heard, it's main strength is that, since it's made with Javascript and HTML+CSS, and every consumer device (mobiles, PC's, tablets, etc.) with all 3 OS's (Linux, Mac and Windows) can understand it, you can just build the app once and it will work on any device/platform. According to their logic, today's devices are so strong that is offsets javascript's slower speed.

Did I miss anything? Is there a better method for this?

10

u/bachkhois Jul 29 '18

Native desktop GUI toolkits like Qt, GTK, WxWidget are already cross-platform, it can run on 3 major OSs. If you don't want to code in difficult languages like C/C++, you can use their binding in Python, which is already cross-platform, can run on 3 OSs, and with the benefit of leaner stack as I analysed above.

And note that, your app is easier to be cross-platform, if its feature is limited, it doesn't depend too tight on OS-specific feature, like D-Bus on Linux.

Coming to cross-platform, native desktop toolkits even have longer history than Electron.

Today devices are stronger than before, but it still not as strong as Electron developers think. That is why many users like me and someone who agree with me, are frustrated with Electron apps.