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/[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.