Improve loading performance

This commit is contained in:
2021-01-08 15:04:30 +01:00
parent 23ad84ef30
commit 8700e2fdde
7 changed files with 145 additions and 48 deletions

View File

@ -68,6 +68,7 @@ public class VCDDbLoader implements IWaveformDbLoader, IVCDDatabaseBuilder {
@SuppressWarnings("unchecked")
@Override
public boolean load(IWaveformDb db, File file) throws InputFormatException {
dispose();
if(file.isDirectory() || !file.exists()) return false;
this.maxTime=0;
boolean res = false;
@ -110,6 +111,11 @@ public class VCDDbLoader implements IWaveformDbLoader, IVCDDatabaseBuilder {
return true;
}
public void dispose() {
moduleStack=null;
signals=null;
}
/* (non-Javadoc)
* @see com.minres.scviewer.database.ITrDb#getMaxTime()
*/