Tuukka Lehtonen [Tue, 13 Mar 2018 09:08:40 +0000 (11:08 +0200)]
Added graph.tg hash caching to FixExportedOntology
Moved generic database baselining code to DatabaseBaselines from
SimanticsPlatform and added new utility functions to DataContainers and
cleaned up existing methods therein using resource-try statements.
Also note org.simantics.graph.refactoring.TransferableGraphHasher that
can be used for adding hash values to graph.tg files.
Tuukka Lehtonen [Mon, 12 Mar 2018 20:15:14 +0000 (22:15 +0200)]
Fixed platform startup ontology update hash checking to work
There was a typo in the Extensions class constant that identified cached
hash value in the DataContainer metadata map compared to the maven graph
builder plug-in.
Tuukka Lehtonen [Fri, 9 Mar 2018 21:41:15 +0000 (23:41 +0200)]
Platform startup performance improvements
1. DB baselining can now be enabled with ontology update checking due to
caching of TG hash values in the DataContainer.metadata
map field with key "cached.hashCode". This diminishes the time taken
by ontology merge need checking to very little time compared to the
old system where all graph.tg files were loaded completely into heap
memory to simply check whether they need to be merged or not.
2. BaselineCreator application can be used to construct a baseline with
a built product in any OS supported by Simantics.
To get the benefit from these changes, you'll also need to use the
version 0.0.9 of the graph-builder-maven-plugin.
Tuukka Lehtonen [Fri, 9 Mar 2018 11:20:47 +0000 (13:20 +0200)]
Include cached hash code in TransferableGraph1 extensions map
The cached hashcode is calculated before inserting the cached hash value
in the TransferableGraph1.extensions TreeMap. Reading and inspection
must be done with this in mind.
This cached value is used to optimize platform startup by removing the
need to calculate the TransferableGraph1 structure hashcode at runtime
which can be quite expensive because the standard databoard Bindings are
slow compared to optimal methods. Of course an optimized binding could
be used to speed the calculation up dramatically but it still can't beat
caching the final (immutable) hashCode value.
Tuukka Lehtonen [Thu, 1 Mar 2018 23:08:48 +0000 (01:08 +0200)]
Added HDF5 Java interface library version 1.10.0-patch1 to the platform
If you need the library in your product, include the hdf.hdf5 feature to
include the hdf.hdf5lib plug-in.
For now only the win32.x86_64 build of the interface library is included
in the plug-in but also linux and mac compilations of the DLL should be
included in the future.
Antti Villberg [Tue, 27 Feb 2018 09:00:13 +0000 (11:00 +0200)]
Simulator toolkit enhancements
The basic simulator node manager and its supporting structures have been
moved to org.simantics.simulator[.toolkit] and stripped of any
dependency the Simantics database interfaces.
org.simantics.simulator.toolkit.db now contains the parts that bind the
simulator toolkit interfaces to the Simantics DB.
Tuukka Lehtonen [Wed, 28 Feb 2018 11:08:16 +0000 (13:08 +0200)]
Added more createRun utility functions to ExperimentRuns
The new functions directly take WriteGraph as input to allow clients to
create an experiment run within one write transaction and still work on
it afterwards.
Tuukka Lehtonen [Wed, 21 Feb 2018 10:58:32 +0000 (12:58 +0200)]
SimanticsPlatform.startUp ensures updateness of installed feature groups
Previously the installed feature group update code was only executed
when the workspace was first initialized. This does work when new
features are installed into Simantics programs running on existing
workspaces.
Tuukka Lehtonen [Tue, 20 Feb 2018 22:26:16 +0000 (00:26 +0200)]
Fixed InvertBasicExpressionVisitor.invert to keep inverted value type
Previously the code would convert all Number-values to Double instead of
passing the inverted value to Variable.setValue in the same type the
original non-inverted value was in.
Tuukka Lehtonen [Fri, 16 Feb 2018 13:09:29 +0000 (15:09 +0200)]
Dispose ClientChangesImpl ChangeSets to minimize memory footprint
This change stems from the fact that
org.simantics.db.common.changeset.GenericChangeListener gives ChangeSets
as an argument to DB requests which can leave strong references to the
ChangeSet instances in the DB QueryProcessor until the DB client
garbage collects these requests. Usually DB client request parameters
should be immutable, but in this case the request is never listened to
for changes so it is OK dispose of the ChangeSet parameter after all
DB ChangeListeners are notified.
This change adds a Disposable implementation to ClientChangesImpl which
minimizes the memory footprint of the class down to 192 bytes compared
to ~2^17 bytes. The instances can take up a very considerable amount of
memory if not disposed. It has not been uncommon to see multiple
gigabytes of memory being spent by these byte[] buffers that are not
really used anymore but still referenced.
Once more note that this is not a case of memory leakage but simply bad
use of memory through over-sized buffers that were GC'ed eventually.
Tuukka Lehtonen [Fri, 9 Feb 2018 08:26:29 +0000 (10:26 +0200)]
Added more TransferableGraphs.writeTransferableGraph methods
* writeTransferableGraph(RequestProcessor,
TransferableGraphSource,
File,
TGStatusMonitor)
writes the specified TG source into the specified file as a variant
(i.e. datatype + data)
* writeTransferableGraphVariant(RequestProcessor,
TransferableGraphSource,
RandomAccessBinary,
TGStatusMonitor)
writes the specified TG source into the specified output binary file
as a variant (i.e. datatype + data)
Tuukka Lehtonen [Mon, 29 Jan 2018 13:54:46 +0000 (15:54 +0200)]
Added syncActivateModel function for deterministic SCL script execution
syncActivateModel works directly by invoking the old activeModel
function and then waiting until all related activities are finished by
using the old trusty Simantics/Misc/syncGraph function.
Tuukka Lehtonen [Fri, 19 Jan 2018 13:50:54 +0000 (15:50 +0200)]
Moved org.simantics.issues.ui.ontology to org.simantics.issues.feature
org.simantics.issues.common depends on org.simantics.issues.ui.ontology
now anyway, and the ontology plug-in, albeit is UI related, does not
have any direct dependency to any UI code anyway.