Closed qwelias closed 5 years ago
My initial assumption regarding hyperclick was incorrect.
Example .tern-project
:
{
"ecmaVersion": "7",
"libs": [],
"loadEagerly": [],
"dontLoad": [],
"plugins": {
"doc_comment": true,
"node": {
"dontLoad": "",
"load": "",
"modules": ""
},
"node_resolve": {},
"modules": {
"dontLoad": "",
"load": "",
"modules": ""
},
"commonjs": {}
}
}
Steps to reproduce:
After just a few seconds of profiling the worker you can see that process._fatalException @internal/bootstrap/node.js:444
eats around 45% of process time because it gets bombarded with errors.
Error stack:
Error [ERR_IPC_CHANNEL_CLOSED]: Channel closed
at process.target.send (internal/child_process.js:627:16)
at process.<anonymous> (/home/qwelias/.atom/packages/atom-ternjs/lib/atom-ternjs-server-worker.js:119:11)
at process.emit (events.js:182:13)
at process._fatalException (internal/bootstrap/node.js:451:27)
So what happens is on disconnect
worker does process.kill()
but does not specifies pid
which is mandatory, then it just goes into infinite recursion
+1 here
Recently js-hyperclick package began to require hyperclick to be installed.
I'm not who to blame but if hyperclick is enabled then
atom-ternjs-server-worker.js
's CPU utilization goes to 100%I'd like to profile it, but am not sure how to specify exec flags to run it with
--inspect
so I can attach DevTools