Open rickyes opened 5 years ago
I found that parsing the wrong zip resulted in increased CPU usage, and I found a problem after debug:
Parse.prototype._flush = function (callback) { if (!this._streamEnd || !this._streamFinish) { return setImmediate(this._flush.bind(this, callback)); } this.emit('close'); return callback(); };
Here _streamEnd and _streamFinish variables has been meet the conditions, so constantly registered setImmediate to the event loop
_streamEnd
_streamFinish
setImmediate
+1
use unzip.Extract, Cpu soars from 4% to 50% and does not recover.
I found that parsing the wrong zip resulted in increased CPU usage, and I found a problem after debug:
Here
_streamEnd
and_streamFinish
variables has been meet the conditions, so constantly registeredsetImmediate
to the event loop