]> gerrit.simantics Code Review - simantics/platform.git/commitdiff
Include cached hash code in TransferableGraph1 extensions map 43/1543/2
authorTuukka Lehtonen <tuukka.lehtonen@semantum.fi>
Fri, 9 Mar 2018 11:20:47 +0000 (13:20 +0200)
committerTuukka Lehtonen <tuukka.lehtonen@semantum.fi>
Fri, 9 Mar 2018 11:22:12 +0000 (13:22 +0200)
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.

refs #7806

Change-Id: I9d4fc6549cba567f95b19f80bd15c1ccfbbedf07


No differences found