Warm up the iteration cache.
(self)
| 79 | } |
| 80 | |
| 81 | def warmup(self): |
| 82 | """Warm up the iteration cache.""" |
| 83 | self._len = self._graph.number_of_nodes() |
| 84 | if self._len > 1000: |
| 85 | # avoid much small graphs to compete thread resource |
| 86 | self.enable_iter_cache = True |
| 87 | self._async_fetch_node_id_cache(0) |
| 88 | self._async_fetch_succ_cache(0) |
| 89 | self._async_fetch_node_attr_cache(0) |
| 90 | self._async_fetch_succ_attr_cache(0) |
| 91 | |
| 92 | # LRU Caches |
| 93 | @lru_cache(1000000) |
no test coverage detected