Cache properties accessing libsonata methods#211
Conversation
|
Sure, I can also add more context: in #208 the node population would be retrieved each time In a script like the one provided in #195, In real use cases, I think that |
3094cc0 to
69dfe43
Compare
Codecov Report
@@ Coverage Diff @@
## master #211 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 29 29
Lines 2159 2163 +4
=========================================
+ Hits 2159 2163 +4
Flags with carried forward coverage won't be shown. Click here to find out more.
|
If nodes and edges
_populationand_propertiesare accessed several times, there can be a small performance improvement if they are cached.For a given circuit, the returned objects should always be the same, and the memory occupation should be minimal compared to the circuit data, so caching them shouldn't be an issue.
Some basic tests:
Results @master:
Results @more_cached_properties