Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unzip.Extract causes the cpu to rise and never decreases. #36

Open
liangzhuang327 opened this issue Sep 4, 2020 · 1 comment
Open

Comments

@liangzhuang327
Copy link

liangzhuang327 commented Sep 4, 2020

use unzip.Extract, Cpu soars from 4% to 50% and does not recover.

The feature I used in the electron program, removing unzip.Extract cpu will steadily decrease, plus this sentence will rise and not decrease.
image

The task in Parse.prototype._flush has been triggered, causing the cpu to remain busy.

`this._pullStream.once("end", function () {
self._streamEnd = true;
});
this._pullStream.once("finish", function () {
self._streamFinish = true;
});

Parse.prototype._flush = function (callback) {
if (!this._streamEnd || !this._streamFinish) {
return setImmediate(this._flush.bind(this, callback));
}

var r = callback();
this.emit('close');
return r;
};`

Following the example in README.md, I found that the event registered above was not triggered, causing theParse.prototype._flush to be called again. It ends up with a cpu busyness.

Is it wrong for me to deal with it?

@liangzhuang327
Copy link
Author

solution : replacement

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant