r/programming • • Dec 05 '15

Microsoft Edge’s JavaScript engine to go open-source

https://blogs.windows.com/msedgedev/2015/12/05/open-source-chakra-core/
1.6k Upvotes

504 comments sorted by

View all comments

Show parent comments

4

u/theonlylawislove Dec 06 '15

It has a slower start up time, but beyond that, there is nothing wrong with the performance. Of course though, it will never beat sublime.

2

u/[deleted] Dec 06 '15

Why will it never beat sublime?

0

u/theonlylawislove Dec 06 '15

Not with large files and the such. I haven't done metrics myself, but I'm sure that in general, a python environment is faster that electron (atom shell). Native apps will always out perform a browser/page.

4

u/[deleted] Dec 06 '15

But vs code is native too right? I agree that sublime is stupid fast with big files. Just wonder if vs code will ever compete.

1

u/fridsun Dec 06 '15

Sublime Text uses its own UI kit and is written in probably C++. Few can compete with that in speed. VS code being an Electron app is written in JavaScript (TypeScript?) and run in a chrome content renderer. It's not native.

1

u/Freeky Dec 06 '15

Code is written almost entirely in JavaScript, with a UI driven by a [browser layout engine](https://en.wikipedia.org/wiki/Blink_(web_engine)) and its completely generalised DOM API, and text modelled using trees of JavaScript objects.

Sublime's written in C++ with optional supporting Python on the side, and a tuned native UI toolkit with specialised APIs reflecting the needs of a text editor. Text is modelled using efficient data structures on the C++ side.

So, while the Python implementation Sublime uses is actually considerably slower than the JavaScript engine Code is based on.

Code could lean further towards the Sublime model, but it would cost a lot of effort and flexibility. I wouldn't hold your breath.

1

u/[deleted] Dec 07 '15

Cool, thanks for the response. Now I know.

1

u/drjeats Dec 06 '15 edited Dec 08 '15

I don't think it has much to do with Python, more that its scripting language doesn't also do all the logic including rendering.