diff --git a/src/contract/HandlerBasedContract.ts b/src/contract/HandlerBasedContract.ts index c941b54c..690cc6e2 100644 --- a/src/contract/HandlerBasedContract.ts +++ b/src/contract/HandlerBasedContract.ts @@ -533,8 +533,10 @@ export class HandlerBasedContract implements Contract { if (cachedState && cachedState.sortKey == upToSortKey) { this.logger.debug('State fully cached, not loading interactions.'); if (forceDefinitionLoad || evolvedSrcTxId || interactions?.length) { + const defBenchmark = Benchmark.measure(); contractDefinition = await definitionLoader.load(contractTxId, evolvedSrcTxId); - if (interactions?.length) { + this.logger.debug('Definition load', defBenchmark.elapsed()); + if (interactions?.length > 1) { sortedInteractions = (await this._sorter.sort(interactions.map((i) => ({ node: i, cursor: null })))).map( (i) => i.node );