← Back to context

Comment by groundzeros2015

10 days ago

You think IDEs are written in JS because of the performance benefits of the threading model?

I thought it was because they could copy chromium.

Why do you think they don’t struggle with input latency? Because the non blocking nature built into the browser model is so powerful and you cannot get that with threads.

  • I disagree with the premise. I cannot imagine a better latency experience than blocking loop IDEs like VS6.

    Which inputs are getting latency? The keyboard? The files?

    > the non blocking nature

    https://youtu.be/bzkRVzciAZg?si=BuBXxHTgN0OqsAhI

    • Hate to break it to you but windows gui programming, emblemified by VS6, is about as far away from a blocking threaded model as you get. You literally have a UI event loop and any compute intensive work is meant to be offloaded to other threads via messages/COM. This is why when they failed to do that correctly the entire UI would lock up - because they didn’t have good hygiene around how to offload compute intensive operations that also interacted with the GUI.

      You’ve literally argued against yourself without realizing.

      3 replies →

  • Are you sure that latency-sensitive parts are written in async JS instead of having a separate UI thread (pool)? I have no idea myself, but without knowing the details it's hard to argue. Note, that browsers themselves, are usually written in languages like C++ or Rust. They run JS, but aren't written in it

    • If you implement threads and code that reacts to an input queue (e.g. PostMessage, queue_push, mq_send, ...), you've implemented (probably a bad version of) async threads. And yes, that's exactly what Windows 1.0 did and what made it great.

      But God help you if you have to change the code. Async threads are a way to organize it and make it workable for humans.

    • Yes they are, the UI layer is mostly JS, outside the rendering and layout engines.