Skip to content

Commit

Permalink
Set default coresToUse to 2 instead of the total number of cores on t…
Browse files Browse the repository at this point in the history
…he system for now until we can figure out how to get better performance out of BaseX running parallel queries.
  • Loading branch information
pralitp committed Dec 1, 2015
1 parent 40d13c2 commit 08b0be2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion ModelInterface/src/ModelInterface/ModelGUI2/BatchWindow.java
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,10 @@ public BatchWindow(final File outputFile, final Vector<Object[]> toRunScns,
final String coresToUsePropertyName = "coresToUse";
final int numSystemCores = Runtime.getRuntime().availableProcessors();
Properties prop = InterfaceMain.getInstance().getProperties();
final int numCoresToUse = Integer.valueOf(prop.getProperty(coresToUsePropertyName, Integer.toString(numSystemCores)));
// TODO: set the default cores to use low until we figure out how to get BaseX to
// perform better with many parallel queries.
//final int numCoresToUse = Integer.valueOf(prop.getProperty(coresToUsePropertyName, Integer.toString(numSystemCores)));
final int numCoresToUse = Integer.valueOf(prop.getProperty(coresToUsePropertyName, Integer.toString(2)));
prop.setProperty(coresToUsePropertyName, Integer.toString(numCoresToUse));
// Create a thread pool to run queries in
queryThreadPool = Executors.newFixedThreadPool(numCoresToUse);
Expand Down

0 comments on commit 08b0be2

Please sign in to comment.