Perfect your code
With built-in code review tools, GitHub makes it easy to raise the quality bar before you ship. Join the 40 million developers who've merged over 200 million pull requests.
Sign up for free See pricing for teams and enterprisesVerifyPieces: Removed Parallel execution to prevent excessive memory consumption... #447
Conversation
…d also to prevent UI/Process to hang when verifying large files. Also introduced a verifyingPieces flag on Torrent - in order to let consumers of the library detect when files are being verified. self._onStore() is being invoked before Torrent is verified - so that consumers can poll on the verifyingPieces flag to detect this.
This comment has been minimized.
This comment has been minimized.
|
It looks like this change causes the travis builds to stall, and they also stall on my local machine. I know you said the tests won't run on Windows, but you could try rebasing your changes onto |
This comment has been minimized.
This comment has been minimized.
IngoValente
commented
Nov 30, 2015
|
Thanks for this, indeed keeps my UI usable while verifying. However the sha1 hash check is async, so shouldn't the 'verify next piece check' be inside the sha1 callback function? I got stuck using your code because it would mark verifying as done before the last piece was actually verified, and that fixed it for me. |
This comment has been minimized.
This comment has been minimized.
|
@ngjermundshaug @josephfrazier @IngoValente Thanks all, for your contributions to this PR! The simplest – and fastest – solution is to limit the number of concurrent verifications to one per CPU core so we go as fast as possible, but no faster. Here's what I decided to go with: 664eb30 |
This comment has been minimized.
This comment has been minimized.
|
Released as 0.72.1. |
This comment has been minimized.
This comment has been minimized.
lock
bot
commented
May 4, 2018
|
This thread has been automatically locked because it has not had recent activity. To discuss futher, please open a new issue. |
ngjermundshaug commentedSep 28, 2015
…and also to prevent UI/Process to hang when verifying large files.
Also introduced a verifyingPieces flag on Torrent - in order to let consumers of the library detect when files are being verified.
self._onStore() is now being invoked before Torrent is verified - so that consumers can poll on the verifyingPieces flag.
UI Demo: http://screencast.com/t/NgbUPvQLik1O