Skip to content
Snippets Groups Projects
  1. Apr 05, 2023
  2. Mar 16, 2023
    • Jérémy Bobbio (Lunar)'s avatar
      Add several helper methods returning SWHIDs · 48a46285
      Jérémy Bobbio (Lunar) authored
      This adds several helper methods returning SWHIDs to model objects,
      namely:
      
      - SkippedContent.swhid()
      - DirectoryEntry.swhid()
      - SnapshotBranch.swhid()
      - Release.target_swhid()
      - Revision.directory_swhid() and Release.parent_swhids()
      - OriginVisitStatus.origin_swhid() and
        OriginVisitStatus.snapshot_swhid()
      v6.7.0
      48a46285
  3. Feb 17, 2023
  4. Feb 16, 2023
  5. Feb 14, 2023
  6. Feb 13, 2023
    • Antoine Lambert's avatar
      collections: Improve ImmutableDict look up by key performance · d6d17dad
      Antoine Lambert authored
      Previously when looking up data by key in an ImmutableDict, the inner
      tuple storing keys and values was iterated until finding the requested
      key.
      
      This is not really efficient when the ImmutableDict contains a lot of
      entries, typically for an origin snapshot containing a lot of branches.
      
      So use an inner dictionary to speedup look up by key operations and
      improve loader performances.
      v6.6.2
      d6d17dad
  7. Feb 02, 2023
  8. Dec 19, 2022
  9. Dec 15, 2022
  10. Dec 05, 2022
  11. Oct 18, 2022
  12. Oct 17, 2022
  13. Sep 30, 2022
  14. Sep 29, 2022
    • Pierre-Yves David's avatar
      from_disks: fix some of the pattern checking logic · 6a38c4ad
      Pierre-Yves David authored
      The pattern were validated from $PWD and later applied on path relative
      to `root_path`. So we shuffle a bit of code to test them againt
      root_path. We make the absolute pattern relative in the same go.
      
      This code is coming from swh-scanner and should probably get an
      overhaul, how ever for now we start with making it no broken.
      6a38c4ad
  15. Sep 26, 2022
  16. Sep 23, 2022
    • Pierre-Yves David's avatar
      model: inline the call to `_check_swhid` · 2d65a24a
      Pierre-Yves David authored
      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%
      v6.5.0
      2d65a24a
    • Pierre-Yves David's avatar
      model: optimization pass on custom validator · 3608271a
      Pierre-Yves David authored
      (This commit is actually doing two things /o\)
      
      - we inline the type-checking in the custom validator to reduce the
        number of function call.
      
      - we optimize some of the custom validator by skipping the creation of
        intermediate tuples.
      3608271a
    • Pierre-Yves David's avatar
      model: delete unused validator code · 3796e5ba
      Pierre-Yves David authored
      Since all `generic_type_validator` are optimized away, the code will no
      longer be called. So we remove that code to avoid any drifting.
      
      A nice "exception" is provided in case this start getting called again
      in the future.
      3796e5ba
Loading