comparison service/mqtt_to_rdf/stmt_chunk.py @ 1697:88f6e9bf69d1

stats and non-debug mode speedups
author drewp@bigasterisk.com
date Tue, 28 Sep 2021 00:32:16 -0700
parents 73abfd4cf5d0
children
comparison
equal deleted inserted replaced
1696:cdf706cf5f82 1697:88f6e9bf69d1
107 def ruleMatchesFrom(self, workingSet: 'ChunkedGraph') -> Iterator[AlignedRuleChunk]: 107 def ruleMatchesFrom(self, workingSet: 'ChunkedGraph') -> Iterator[AlignedRuleChunk]:
108 """Chunks from workingSet where self, which may have BindableTerm wildcards, could match that workingSet Chunk.""" 108 """Chunks from workingSet where self, which may have BindableTerm wildcards, could match that workingSet Chunk."""
109 # if log.isEnabledFor(logging.DEBUG): 109 # if log.isEnabledFor(logging.DEBUG):
110 # log.debug(f'{INDENT*6} computing {self}.ruleMatchesFrom({workingSet}') 110 # log.debug(f'{INDENT*6} computing {self}.ruleMatchesFrom({workingSet}')
111 allChunksIter = workingSet.allChunks() 111 allChunksIter = workingSet.allChunks()
112 if "stable failures please": 112 if log.isEnabledFor(logging.DEBUG): # makes failures a bit more stable, but shows up in profiling
113 allChunksIter = sorted(allChunksIter) 113 allChunksIter = sorted(allChunksIter)
114 for chunk in allChunksIter: 114 for chunk in allChunksIter:
115 try: 115 try:
116 aligned = AlignedRuleChunk(self, chunk) 116 aligned = AlignedRuleChunk(self, chunk)
117 except Inconsistent: 117 except Inconsistent: