HomeSoftware Heritage

model: inline the call to `_check_swhid`

This commit no longer exists in the repository. It may have been part of a branch which was deleted.

Description

model: inline the call to _check_swhid

This reduce the number of function call and should be faster.

The mashup of blind optimisation in the previous changeset yield some
interesting results in total.

It would be insightful to measure them individually, but that would
take more time than we currently have.

When testing all the validator changes on our previous "benchmark" we
see quite interesting improvement.

swh loader run mercurial https://foss.heptapod.net/mercurial/mercurial-devel directory=/data/repos/mercurial-devel

Median time of 3 run

base: 17 minutes 48 seconds
before: 11 minutes 50 seconds
after: 11 minutes 11 seconds

On a profile of the same run, the to_model call of the from_disk's Directory class took the following percentage:
base: 43%
before: 15%
after: 11%

Details

Provenance
marmouteAuthored on Sep 22 2022, 2:55 PM
marmoutePushed on Sep 26 2022, 2:28 PM
Differential Revision
D8512: various optimisation to the model validation logic.
Build Status
Buildable 31748
Build 49671: test-and-buildJenkins console · Jenkins

Commit No Longer Exists

This commit no longer exists in the repository.