From 6b9e3c0e70cf96a944719e544b03495e1c209e02 Mon Sep 17 00:00:00 2001 From: Eyck Jentzsch Date: Fri, 8 May 2020 08:38:43 +0200 Subject: [PATCH] add performance improvement fixes --- com.minres.scviewer.database.text/pom.xml | 4 +- .../database/text/TextDbLoader.groovy | 47 ++++++------------- com.minres.scviewer.parent/pom.xml | 4 +- 3 files changed, 18 insertions(+), 37 deletions(-) diff --git a/com.minres.scviewer.database.text/pom.xml b/com.minres.scviewer.database.text/pom.xml index 24efc0c..c09a4f5 100644 --- a/com.minres.scviewer.database.text/pom.xml +++ b/com.minres.scviewer.database.text/pom.xml @@ -24,8 +24,8 @@ - 1.7 - 1.7 + 1.8 + 1.8 diff --git a/com.minres.scviewer.database.text/src/com/minres/scviewer/database/text/TextDbLoader.groovy b/com.minres.scviewer.database.text/src/com/minres/scviewer/database/text/TextDbLoader.groovy index 3b3a45a..6fd56d6 100644 --- a/com.minres.scviewer.database.text/src/com/minres/scviewer/database/text/TextDbLoader.groovy +++ b/com.minres.scviewer.database.text/src/com/minres/scviewer/database/text/TextDbLoader.groovy @@ -83,7 +83,7 @@ public class TextDbLoader implements IWaveformDbLoader{ .make() // NPE here ---> parseInput(gzipped?new GZIPInputStream(new FileInputStream(file)):new FileInputStream(file)) - calculateConcurrencyIndicees() + streams.each{ TxStream stream -> stream.getMaxConcurrency() } return true } } catch (IndexOutOfBoundsException e) { @@ -136,7 +136,7 @@ public class TextDbLoader implements IWaveformDbLoader{ case "ms":return 1000000000000L case "s": return 1000000000000000L } - return "fs" + return 1L } private def parseInput(InputStream inputStream){ @@ -153,23 +153,29 @@ public class TextDbLoader implements IWaveformDbLoader{ def tokens = line.split(/\s+/) as ArrayList switch(tokens[0]){ case "scv_tr_stream": - case "scv_tr_generator": - case "begin_attribute": - case "end_attribute": if ((matcher = line =~ /^scv_tr_stream\s+\(ID (\d+),\s+name\s+"([^"]+)",\s+kind\s+"([^"]+)"\)$/)) { def id = Integer.parseInt(matcher[0][1]) def stream = new TxStream(this, id, matcher[0][2], matcher[0][3]) streams< stream.getMaxConcurrency() } - } - - public Collection getAllRelationTypes(){ return relationTypes.values(); } diff --git a/com.minres.scviewer.parent/pom.xml b/com.minres.scviewer.parent/pom.xml index edd3538..42dec6e 100644 --- a/com.minres.scviewer.parent/pom.xml +++ b/com.minres.scviewer.parent/pom.xml @@ -24,8 +24,8 @@ 1.5.0 - 3.5.0 - 2.5.8-03 + 3.6.0-03 + 3.0.3-01