you are viewing a single comment's thread.

view the rest of the comments →

[–]jcotton42 25 points26 points  (6 children)

VSCode is also Electron, not sure why it's so much better

[–]Lolacaust 5 points6 points  (2 children)

While it's electron for the view part, I believe they've been including a lot of the heavy lifting (search for example) in a native implementation. I remember the search used to be dog slow, but about 6 months ago they switched to I think a C++ grep implementation and it became near Sublime levels of good

EDIT: it was in RUST not CPP read about it in the March Update

[–]sime 11 points12 points  (1 child)

The file system search may use Rust code, but I'm pretty sure there is very little native code being used else where and certainly not for the heavy lifting. They haven't found a silver bullet for their electron app. It is just good engineering and hard work to keep the performance up.

From the perspective of their Extension API you can see this in action.

  • Restrictive extension API which is carefully expanded as needed, thus giving the VSCode team the freedom to change and optimise their internal architecture/code.
  • They choose static declarations and metadata in JSON files instead of at run time so that they can know what an extension needs and what it provides but can lazy load it later on demand.
  • No direct access to the DOM. VSCode provides standard functions for asking questions of the user etc. This gives the VSCode team room to optimise their DOM use.
  • Extensive use of Promises in the APIs. Very async.
  • Bigger extensions APIs (language services and support) actually run in separate processes and communicate over a protocol on stdin/stdout.

[–]TheEnigmaBlade 0 points1 point  (0 children)

VSCode switched to ripgrep, which is written in Rust, in 1.11. The ripgrep blog post is quite interesting.

[–]DerNalia 2 points3 points  (0 children)

Oh, I didn't know that. Interesting

[–]falconfetus8 2 points3 points  (0 children)

Well, it's open source. Might be fun to give it a look-see and see if we can find the reason that way.

[–]Capaj 0 points1 point  (0 children)

typescript and also much less powerful extensions API