ExportReviewNotes: Default to 2 threads

Not all systems have enough database connections in the connection
pool to support 2 threads per CPU. Exporting lots of changes doesn't
take that long, so 2 threads is acceptable.

Change-Id: I69bbade7f67023689ca54665833bc764d2d5503d
Signed-off-by: Shawn O. Pearce <sop@google.com>
This commit is contained in:
Shawn O. Pearce 2011-05-31 09:52:38 -07:00
parent 1f412fe330
commit bf9d9ed987
2 changed files with 2 additions and 3 deletions

View File

@ -29,8 +29,7 @@ OPTIONS
configuration data, supporting libaries and log files.
\--threads::
Number of threads to perform the scan work with. Defaults to
twice the number of CPUs available.
Number of threads to perform the scan work with. Default: 2.
CONTEXT
-------

View File

@ -63,7 +63,7 @@ import java.util.Map.Entry;
/** Export review notes for all submitted changes in all projects. */
public class ExportReviewNotes extends SiteProgram {
@Option(name = "--threads", usage = "Number of concurrent threads to run")
private int threads = 2 * Runtime.getRuntime().availableProcessors();
private int threads = 2;
private final LifecycleManager manager = new LifecycleManager();
private final TextProgressMonitor textMonitor = new TextProgressMonitor();