Saturday, 14 April 2018

React ShouldComponentUpdate with transclude content

Experiment 🙌 @react shouldComponentUpdate with transclude content in parent.

App > Menu > Button > some transclude content from App. If Menu stop update then transclude content also not updated.

https://stackblitz.com/edit/react-ngcontent-with-shoulduptate

Don't block event loop

After i readout Docs about
https://nodejs.org/en/docs/guides/dont-block-the-event-loop/

draw 👀 my understanding

Interesting lines on Docs

  1.  Node is fast when the work associated with each client at any given time is "small".
  2. Node can make do with fewer threads, then it can spend more of your system's time and memory working on clients rather than on paying space and time overheads for threads (memory, context-switching).
  3. Only the Event Loop is allowed to see the "namespace" (JavaScript state) of your application. From a Worker, you cannot manipulate a JavaScript object in the Event Loop's namespace. Instead, you have to serialize and deserialize any objects you wish to share. Then the Worker can operate on its own copy of these object(s) and return the modified object (or a "patch") to the Event Loop.
  4. Node excels for I/O-bound work, but for expensive computation it might not be the best option
  5. Whether you use only the Node Worker Pool or maintain separate Worker Pool(s), you should optimize the Task throughput of your Pool(s). To do this, minimize the variation in Task times by using Task partitioning.


Event Loop in NodeJS

After deep study🕵️ I understand eventloop concept in node . Process.nexttick & setImdiate are interesting 😎. Stack overflow 👩‍💻 helped.

Why NodeJS

Impressive article about : why NodeJs JVM may be a highly performant beast, but Node.js is fast because programmers are forced to write fast programs by not introducing blocking I/O to the program flow.