Skip to content

Commit d6c415a

Browse files
author
nokutu
committed
When uploading, 8 threads are creating instead of only 1. This should increase upload speed.
git-svn-id: http://svn.openstreetmap.org/applications/editors/josm/plugins/mapillary@31475 b9d5c4c9-76e1-0310-9c85-f3177eceb1e4
1 parent e147f42 commit d6c415a

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/org/openstreetmap/josm/plugins/mapillary/oauth/UploadUtils.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,8 +153,8 @@ private static class SequenceUploadThread extends Thread {
153153
private SequenceUploadThread(List<MapillaryAbstractImage> images) {
154154
this.images = images;
155155
this.uuid = UUID.randomUUID();
156-
this.ex = new ThreadPoolExecutor(1, 1, 25, TimeUnit.SECONDS,
157-
new ArrayBlockingQueue<Runnable>(100));
156+
this.ex = new ThreadPoolExecutor(8, 8, 25, TimeUnit.SECONDS,
157+
new ArrayBlockingQueue<Runnable>(15));
158158
}
159159

160160
@Override
@@ -175,6 +175,7 @@ public void run() {
175175
}
176176
}
177177
this.ex.shutdown();
178+
PluginState.finishUpload();
178179
}
179180
}
180181

src/org/openstreetmap/josm/plugins/mapillary/utils/MapillaryUtils.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,10 @@ public static double degMinSecToDouble(RationalNumber[] degMinSec, String ref) {
9797
}
9898

9999
/**
100+
* Open the default browser in the given URL.
101+
*
100102
* @param url
103+
* The URL that is going to be opened.
101104
*/
102105
public static void browse(URL url) {
103106
Desktop desktop = Desktop.getDesktop();

0 commit comments

Comments
 (0)