Skip to content
Snippets Groups Projects
Commit 814a6c84 authored by Pierre-Yves David's avatar Pierre-Yves David
Browse files

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%
parent 9ce6feb9
No related branches found
Tags v6.3.1
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment