Refactor viewer sessions and selections and optimize transaction queries
This commit is contained in:
1 parent
4824d48828
commit
589762b220
42 files changed
+1118
-720
No files matched your search
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER">
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-17">
|
||||
<attributes>
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
</attributes>
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
eclipse.preferences.version=1
|
||||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
|
||||
org.eclipse.jdt.core.compiler.compliance=11
|
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=17
|
||||
org.eclipse.jdt.core.compiler.compliance=17
|
||||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
|
||||
org.eclipse.jdt.core.compiler.release=enabled
|
||||
org.eclipse.jdt.core.compiler.source=11
|
||||
org.eclipse.jdt.core.compiler.source=17
|
||||
+16
-1
@@ -10,6 +10,9 @@
|
||||
*******************************************************************************/
|
||||
package com.minres.scviewer.database.sqlite;
|
||||
|
||||
import com.minres.scviewer.database.LazyValue;
|
||||
import com.minres.scviewer.database.tx.TransactionLists;
|
||||
import com.minres.scviewer.database.tx.ITransactionProvider;
|
||||
import java.sql.SQLException;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
@@ -28,7 +31,19 @@ import com.minres.scviewer.database.sqlite.db.IDatabase;
|
||||
import com.minres.scviewer.database.tx.ITx;
|
||||
import com.minres.scviewer.database.tx.TxRowAllocator;
|
||||
|
||||
abstract class AbstractTxStream extends HierNode implements IWaveform {
|
||||
abstract class AbstractTxStream extends HierNode implements IWaveform, ITransactionProvider {
|
||||
|
||||
private final LazyValue<List<ITx>> transactionList = new LazyValue<>();
|
||||
|
||||
@Override
|
||||
public List<ITx> getTransactionList() {
|
||||
return transactionList.get(() -> TransactionLists.sorted(getTransactions().values()));
|
||||
}
|
||||
|
||||
@Override
|
||||
public ITx getTransaction(long id) {
|
||||
return id < Integer.MIN_VALUE || id > Integer.MAX_VALUE ? null : getTransactions().get((int) id);
|
||||
}
|
||||
|
||||
protected IDatabase database;
|
||||
|
||||
|
||||
+1
-1
@@ -88,7 +88,7 @@ public class Tx implements ITx {
|
||||
public long getEndTime() { return end; }
|
||||
|
||||
@Override
|
||||
public List<ITxAttribute> getAttributes() {
|
||||
public synchronized List<ITxAttribute> getAttributes() {
|
||||
if(attributes==null){
|
||||
SQLiteDatabaseSelectHandler<ScvTxAttribute> handler = new SQLiteDatabaseSelectHandler<>(
|
||||
ScvTxAttribute.class, database, "tx="+scvTx.getId());
|
||||
|
||||
Reference in new issue
Block a user