Commit 40f9ee62 authored by Philip Makedonski's avatar Philip Makedonski
Browse files

* deactivated batch resolver (#20) for now, no performance advantage

parent fae4c7be
Loading
Loading
Loading
Loading
+45 −43
Original line number Diff line number Diff line
@@ -128,11 +128,16 @@ public class TTCN3ResourceProvider {
				+ MiscTools.msToString(stopwatch.elapsed(TimeUnit.MILLISECONDS)) + " minutes." + '\n');
		
		stopwatch.reset();
		
		//TODO: export as parameter, for now deactivated
		boolean batchResolver = false;
		if (batchResolver) {
	
			stopwatch.start();
			
			System.out.println("Resolving references...");
	
		//TODO: process multicore?
			//serial -> too slow, needed?
	//		for (Resource r : TTCN3GlobalScopeProvider.RESOURCES) {
	//			//TODO: make INFORMATION / DEBUG
	//			System.out.print("Resolving "+r.getURI().path().substring(1)+"...");
@@ -145,6 +150,7 @@ public class TTCN3ResourceProvider {
	//						+ "/"+ MiscTools.secondsToString(stopwatch.elapsed(TimeUnit.MILLISECONDS))+" minutes).");
	//		}
				
			//parallel
			ExecutorService resolverPool = Executors.newFixedThreadPool(getCores());
	
			ArrayList<Resolver> resolver = new ArrayList<Resolver>();
@@ -157,22 +163,18 @@ public class TTCN3ResourceProvider {
				System.out.print('\n');
				for (Future<String> f : output) {
					String o = f.get();
//				System.out.println("Validation output of " + o.getResource().getURI().lastSegment());
//				for (FeatureBasedDiagnostic d : o.getOutput()) {
//					printOutput(o.getResource(), d);
//				}
				}
			} catch (InterruptedException | ExecutionException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}				
			
		
			//TODO: make INFORMATION / DEBUG
			System.out.println("References resolved in "
					+ MiscTools.msToString(stopwatch.elapsed(TimeUnit.MILLISECONDS)) + " minutes." + '\n');
			
			stopwatch.stop();
		}
		
	}