HomeSoftware Heritage

from_disk: only build a model object once

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

Description

from_disk: only build a model object once

Before this change, a Directory object was built to compute the id of
we fed to the Directory object we built for to_model.

We tested this change on simple information of the Mercurial loader,
with a noop-loader stockage:

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

Median time of 3 run

before: 17 minutes 48 seconds
after: 12 minutes 59 seconds

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

Details

Provenance
marmouteAuthored on Sep 20 2022, 2:26 PM
marmoutePushed on Sep 26 2022, 2:28 PM
Differential Revision
D8510: from_disk: only build a model object once
Build Status
Buildable 31738
Build 49661: test-and-buildJenkins console · Jenkins

Commit No Longer Exists

This commit no longer exists in the repository.