A framework that aims to achieve interoperability between software such as simulation engines, databases and data repositories using a knowledge graph as the common language.
Introduced lru_cache_weak and lru_cache_timestamp decorators. Introduced the take method to take a limited number of items from an iterator.
Applied such decorators to methods from OntologyEntity and OntologyClass in order to achieve faster performance while keeping the cache coherent when changes are done to a Session's graph.
Something similar was being done already on SimPhoNy v3, but this time the solution, even though it is quite similar, seems to be more effective.
Adapt existing benchmarks to SimPhoNy v4.
Fix performance on various other places so that it is on par with SimPhoNy v3.
The performance was evaluated using the following code snippets.
SimPhoNy v4
from simphony_osp.namespaces import mechanical as mt
from simphony_osp.namespaces import math, metrology
from simphony_osp.namespaces import properties as prop
from time import time
from tqdm import tqdm
n = (333636 // 3)
start = time()
for i in tqdm(range(0, n)):
bending_stiffness_average_value = 0.0312 # some numerical value
cableSystem = mt.CableBundle()
bendingStiffness_average = mt.BendingStiffness()
realNumber = math.Real(hasNumericalData=bending_stiffness_average_value)
bendingStiffness_average.connect(realNumber, rel=metrology.hasQuantityValue)
cableSystem.connect(bendingStiffness_average, rel=prop.hasProperty)
end = time()
print("time %.2f" % (end - start))
SimPhoNy v3
from osp.core.namespaces import mechanical as mt
from osp.core.namespaces import math, metrology
from osp.core.namespaces import properties as prop
from time import time
from tqdm import tqdm
n = (333636 // 3)
start = time()
for i in tqdm(range(0, n)):
bending_stiffness_average_value = 0.0312 # some numerical value
cableSystem = mt.CableBundle()
bendingStiffness_average = mt.BendingStiffness()
realNumber = math.Real(hasNumericalData=bending_stiffness_average_value)
bendingStiffness_average.add(realNumber, rel=metrology.hasQuantityValue)
cableSystem.add(bendingStiffness_average, rel=prop.hasProperty)
end = time()
print("time %.2f" % (end - start))
Edit: actually the performance increased due to other factors since the SimphoNy v3 test, so it is now just on the same range (see picture below from continuous benchmarking system).
Introduced
lru_cache_weak
andlru_cache_timestamp
decorators. Introduced thetake
method to take a limited number of items from an iterator.Applied such decorators to methods from
OntologyEntity
andOntologyClass
in order to achieve faster performance while keeping the cache coherent when changes are done to aSession
's graph.Something similar was being done already on SimPhoNy v3, but this time the solution, even though it is quite similar, seems to be more effective.
Adapt existing benchmarks to SimPhoNy v4.
Fix performance on various other places so that it is on par with SimPhoNy v3.
The performance was evaluated using the following code snippets.
SimPhoNy v4
SimPhoNy v3
Estimation given by tqdm for each case:
511/111212 [00:07<26:53, 68.62it/s]
5308/111212 [00:07<02:25, 728.48it/s]
2099/111212 [00:07<06:39, 272.89it/s]
Edit: actually the performance increased due to other factors since the SimphoNy v3 test, so it is now just on the same range (see picture below from continuous benchmarking system).