Skip to content

Resolve reference OIDs with a single process

Sami Hiltunen requested to merge smh-resolve-reference-efficient into master

TransactionManager is currently calling ResolveRevision for each reference the transaction is updating to figure out the current value of the reference. This leads to spawning a rev-parse command for each reference which is very inefficient if a transaction contains more than one reference.

Use the existing checkObjects function to resolve the old values of the references using a single command.

Before the optimization with transaction updating 1000 references, we're spending most of the time resolving the references.

Before we were resolving references for 2.4s Näyttökuva_2024-09-27_kello_14.25.53

Näyttökuva_2024-09-27_kello_14.26.04

Afterwards we're resolving references for 57ms

Näyttökuva_2024-09-27_kello_14.27.28

Näyttökuva_2024-09-27_kello_14.27.35

Merge request reports

Loading