A Journey into Node.js Internals | Tamar Twena-Stern

แชร์
ฝัง
  • เผยแพร่เมื่อ 23 ก.ย. 2024

ความคิดเห็น • 12

  • @tusharf5
    @tusharf5 5 ปีที่แล้ว +4

    This is actually a great talk...

  • @lexalexander9334
    @lexalexander9334 3 ปีที่แล้ว +1

    Great talk Tamar! Thank you! It’s my second time watching it.

  • @AustinStory
    @AustinStory 5 ปีที่แล้ว +2

    Great talk, thanks!

  • @viclick122
    @viclick122 5 ปีที่แล้ว +3

    Some of the claims are not entirely accurate.
    The turbo-fan example for example. If you get rid of the push and assign the object to a given index like this: array[i] = {a:22}; (and put the integer assignment to an else branch, so that the object stays in the array), you'll get comparable times.
    And if you move the object creation out of the loop, and add an if statement even to the second loop, you'll find the second loop takes actually more time. But still within the same scale.
    Hence the de-optimization is not caused by the object. It's caused by the 'push'.

  • @EgonOlsen71
    @EgonOlsen71 5 ปีที่แล้ว +4

    Polymorphic types and the number of them have nothing to do with the number of parameters that a function takes as this talk implies. It's about how many different typed values you feed into a single parameter, because that can break the assumption that the jit compiler made when compiling the method to machine code. If it assumed an int and now gets a string, it has to compile another version of that method. If the types are changing wildly during execution, it might give up and go back to interpreted execution. Also, de-optimisation is nothing that you do, it's something that the compiler does. For example in the formerly mentioned case, because its assumptions were wrong. You trigger it, but you don't do it actively. The flow chart even shows this correctly.
    And there's no garbage collection specific to nodejs, it's a V8 thing. The talk somehow makes it sound as if its a nodejs thing, but it's not.
    On the positive side, the talk provided the basic overview of nodejs's architecture that I was looking for.

  • @AnandKumar-fn4sd
    @AnandKumar-fn4sd 4 ปีที่แล้ว

    Hello, does the V8 engine work approximately in the same way in Chrome? ( Obviously the host id different). I read somewhere that promises are handled by a separate queue by the event loop, is that right? What about Async and Await?

  • @Viktor_U
    @Viktor_U 5 ปีที่แล้ว +3

    event loop architecture explained incorrectly (there is no such an event queue in node, also not everything is delegated to the thread pool, some things are delegated to the OS). Check out this great video th-cam.com/video/PNa9OMajw9w/w-d-xo.html to know more...

    • @Hila-ln6eq
      @Hila-ln6eq ปีที่แล้ว

      That's not what she said. She explicitly mentioned working with the operating system. I would love to see you make such a video and put in the effort

    • @Mercio2
      @Mercio2 ปีที่แล้ว

      That event loop diagram is really inaccurate. You can check the explanation by a node/libuv core committer: th-cam.com/video/PNa9OMajw9w/w-d-xo.html@@Hila-ln6eq

  • @mayo2001
    @mayo2001 5 ปีที่แล้ว +6

    Speaker's event loop: OK... OK....OK....

  • @M02ph3u5
    @M02ph3u5 5 ปีที่แล้ว +1

    Okay? Okay? Okay? Okay? Yes, Mr. President. Okay? Okay? Alright.