Skip to content

Commit

Permalink
When uploading, 8 threads are creating instead of only 1. This should…
Browse files Browse the repository at this point in the history
… increase upload speed.

git-svn-id: http://svn.openstreetmap.org/applications/editors/josm/plugins/mapillary@31475 b9d5c4c9-76e1-0310-9c85-f3177eceb1e4
  • Loading branch information
nokutu committed Aug 10, 2015
1 parent e147f42 commit d6c415a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,8 @@ private static class SequenceUploadThread extends Thread {
private SequenceUploadThread(List<MapillaryAbstractImage> images) {
this.images = images;
this.uuid = UUID.randomUUID();
this.ex = new ThreadPoolExecutor(1, 1, 25, TimeUnit.SECONDS,
new ArrayBlockingQueue<Runnable>(100));
this.ex = new ThreadPoolExecutor(8, 8, 25, TimeUnit.SECONDS,
new ArrayBlockingQueue<Runnable>(15));
}

@Override
Expand All @@ -175,6 +175,7 @@ public void run() {
}
}
this.ex.shutdown();
PluginState.finishUpload();
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,10 @@ public static double degMinSecToDouble(RationalNumber[] degMinSec, String ref) {
}

/**
* Open the default browser in the given URL.
*
* @param url
* The URL that is going to be opened.
*/
public static void browse(URL url) {
Desktop desktop = Desktop.getDesktop();
Expand Down

0 comments on commit d6c415a

Please sign in to comment.