Conversation
pombredanne
left a comment
There was a problem hiding this comment.
Miroslav and thanks!
There is an issue wrt. to making this work with large codebase. Even a linux kernel tarball may be problematic... we may need to find a better way.
|
|
||
| progress_manager = None | ||
| if not quiet: | ||
| resources = list(((r.location, r.path) for r in codebase.walk() if r.is_file)) |
There was a problem hiding this comment.
This will be a problem when we have a codebase with 10 million files, we may need to find a better way? ... otherwise the system will literally be stalled for minutes before displaying a progress bar.
There was a problem hiding this comment.
For the kernel, the delay is 45 sec until it traverses 200k files. While the scan itself runs several hours.
With -q there is no delay.
| item_show_func = partial(path_progress_message, verbose=verbose) | ||
| progress_manager = partial(progressmanager, | ||
| item_show_func=item_show_func, | ||
| item_show_func=item_show_func, length=len(resources)*2, |
There was a problem hiding this comment.
Because #3344 Otherwise the progressbar go to 170/170 and then continue to 340/170. This *2 can be removed when we find when we find where is the count done twice. I have a suspicion, but it needs more testing.
|
Several things I considered as an option:
|
|
I tried to improve the performance of walk() in aboutcode-org/commoncode#78 |
|
Looking at the code I don't see that this would fix #3342. I don't see that the number of files that will be processed is displayed. |
The line with The line with 'scans = progress_manager(scans)` set up progress meter. But because constructor does not have the number of items, it does not show the real progress. The line |
Yes but in #3342 I don't care about the progress meter, I just want to see the number of files that will be scanned :-) |
Oh, this would be great. @pombredanne, maybe some time should be spent finding out where the double counting happens? I tried to look for it but I couldn't find it. |
|
Rebased. |
|
Can you please consider a new round of review? |
so progress bar shows real progress Signed-off-by: Miroslav Suchý <msuchy@redhat.com>
|
I removed the |
Actually it would not fix that issue, as I am asking for something else. What I am asking for in that issue is to display a total number of files that will be scanned, so I have an indication of how many files in total will be scanned. This PR fixes a different issue. |


so the progress bar shows real progress
Fixes #3342
Tasks
Run tests locally to check for errors.
The testsuite is broken for me and produce lots of not relevant errors. I will appreciate testing.