-
Notifications
You must be signed in to change notification settings - Fork 60
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
Progress events fired out-of-order #104
Comments
Hi ! |
CLI should be
|
Thanks for the response. Yes, my archive has nested directories. Using the same 7za.exe my app uses, I ran: 7za.exe x archive.7z -r -bsp1 > outlog.txt The resulting outlog.txt file shows a new line each time percent was updated. This value never goes backwards, like it does when using node-7z. For some reason the node-7z progress events are being emitted out-of-order. Log File Content
|
FWIW, I enabled Log File Content
Progress Only
|
Any insight into why these progress events are being fired out-of-order? |
Also having this problem. Used this as a quick hack.
Not sure how accurate it is as I was wondering if each progress event was maybe for individual files in the archive? The progress event seems to have file undefined so I'm not sure but if the percentage is the total then this works fine { percent: 67, fileCount: 5, file: undefinded } |
I wasn't able to reproduce the bug in either Windows, MacOSX, or Linux. Can you elaborate on the setup you are using ? |
I get it running on a Ubuntu Docker imaging running on a Ubuntu Host. That could be it :) |
I agree that both issues appear to be related to buffering of some sort.
Happy to test any fixes you make available. I'll try to dig up whatever 7z file was giving me trouble last time. |
Does the problem occurs with Also, it's not a fix yet but on a branch i removed buffering "dependencies": {
"node-7z": "quentinrossetti/node-7z#fix-buffer"
} Update: Nevermind, using a large enough archive (10GB) with a single file in it I can reproduce the bug. In my testing it even drops several times to 0% so... |
The following is the smallest reproduction I've been able to put together, so far.
Code: const path = require('path');
const Seven = require('node-7z');
const sourceFile = path.resolve(__dirname, 'solidworks-07.3.0.7z');
const extractStream = Seven.extractFull(sourceFile, __dirname, {
recursive: true,
$bin: path.resolve(__dirname, '7za.exe'),
$progress: true,
});
extractStream.on('progress', (progress) => {
const { percent, fileCount } = progress;
console.log(`percent: ${percent} | count: ${fileCount}`);
}); I confirmed that this also fails with your |
Thanks for your feedback. |
The PR mechanism has automatically closed this issue but until some confirmation I re-open it. |
I expanded my test script to auto-verify that neither I'll comment separately in the other issue as soon as I can, since that one had more parts to it. |
I'm using an onProgress function, but it is sometimes firing progress events out-of-order. This happens more often with a very large (4GB+) file.
The 'progress' events will intermittently fire in an order similar to the following
percent: 19
percent: 19
percent: 20
percent: 19 <-- what?
percent: 20
percent: 21
percent: 21
percent: 22
Happy to provide more sample code, but it's fairly straightforward to reproduce. I'm using 7za.exe as the
$bin
.The text was updated successfully, but these errors were encountered: