My application is a web version of the board game Settlers of Catan.
I'm using node --prof app.js
to profile the app and node --prof-process ISOLATE_LOG_FILE > processed.txt
to turn them into a processed file.
I do get a lot of Code move event for unknown code
events: https://prnt.sc/q69ugk
At the end I'm left with a file, like so:
Statistical profiling result from isolate-0x3df60c0-v8.log, (13113 ticks, 192 unaccounted, 0 excluded).
The epoll module is used by onoff to detect such interrupts. epoll supports Node.
To address these issues, Node. JS uses a single thread with an event-loop. In this way, Node can handle 1000s of concurrent connections without any of the traditional detriments associated with threads. There is essentially no memory overhead per-connection, and there is no context switching.
In Node, I/O operations are offloaded to the C++ APIs (libUV) which allows the Node. js main thread to continue executing your code without having to wait for file or network operations to finish. In this tutorial we will: Learn how to write synchronous and asynchronous file callbacks in Node.
js receives a CPU bound task: Whenever a heavy request comes to the event loop, Node. js would set all the CPU available to process it first, and then answer other requests queued. That results in slow processing and overall delay in the event loop, which is why Node. js is not recommended for heavy computation.
epoll_pwait essentially means your application (event loop) is waiting for something, i.e I/O operation.
Quoting the link above:
A call to epoll_pwait()
will block until either:
• a file descriptor delivers an event;
• the call is interrupted by a signal handler; or
• the timeout expires.
for further debugging, what really comes to my mind is, if you have any setInterval
code with little or zero timeout, if so, please post this callback function you're passing to the interval.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With