Page MenuHomeSoftware Heritage

cli: speedup the `swh` cli command startup time
ClosedPublic

Authored by douardda on Thu, Sep 10, 4:25 PM.

Details

Summary

by moving import statements in functions, as well as preventing
the loading of swh.storage.interface in swh.storage unless needed
for type checking.

Related to T2575.

Diff Detail

Repository
rDSTO Storage manager
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

douardda created this revision.Thu, Sep 10, 4:25 PM

Build has FAILED

Patch application report for D3921 (id=13781)

Rebasing onto d24a1e7732...

First, rewinding head to replay your work on top of it...
Applying: cli: speedup the `swh` cli command startup time
Changes applied before test
commit 11fb17cb7ec5f5d801fd73cb68376d72b1fbb631
Author: David Douard <david.douard@sdfa3.org>
Date:   Thu Sep 10 15:15:33 2020 +0200

    cli: speedup the `swh` cli command startup time
    
    by moving import statements in functions, as well as preventing
    the loading of swh.storage.interface in swh.storage unless needed
    for type checking.
    
    Related to T2575.

Link to build: https://jenkins.softwareheritage.org/job/DSTO/job/tests-on-diff/915/
See console output for more information: https://jenkins.softwareheritage.org/job/DSTO/job/tests-on-diff/915/console

vlorentz added inline comments.
swh/storage/__init__.py
26

string

73

string

douardda updated this revision to Diff 13811.Thu, Sep 10, 5:38 PM

use string annotations

Build has FAILED

Patch application report for D3921 (id=13811)

Rebasing onto d24a1e7732...

First, rewinding head to replay your work on top of it...
Applying: cli: speedup the `swh` cli command startup time
Changes applied before test
commit 2822031b8db2d9bd2510b5df7b63af0bde551122
Author: David Douard <david.douard@sdfa3.org>
Date:   Thu Sep 10 15:15:33 2020 +0200

    cli: speedup the `swh` cli command startup time
    
    by moving import statements in functions, as well as preventing
    the loading of swh.storage.interface in swh.storage unless needed
    for type checking.
    
    Related to T2575.

Link to build: https://jenkins.softwareheritage.org/job/DSTO/job/tests-on-diff/916/
See console output for more information: https://jenkins.softwareheritage.org/job/DSTO/job/tests-on-diff/916/console

Build has FAILED

Patch application report for D3921 (id=13814)

Rebasing onto d24a1e7732...

First, rewinding head to replay your work on top of it...
Applying: cli: speedup the `swh` cli command startup time
Changes applied before test
commit ab81a73d2ef97f38a730aa0a99b1de860d7c42d2
Author: David Douard <david.douard@sdfa3.org>
Date:   Thu Sep 10 15:15:33 2020 +0200

    cli: speedup the `swh` cli command startup time
    
    by moving import statements in functions, as well as preventing
    the loading of swh.storage.interface in swh.storage unless needed
    for type checking.
    
    Related to T2575.

Link to build: https://jenkins.softwareheritage.org/job/DSTO/job/tests-on-diff/917/
See console output for more information: https://jenkins.softwareheritage.org/job/DSTO/job/tests-on-diff/917/console

vlorentz accepted this revision.Thu, Sep 10, 6:46 PM
This revision is now accepted and ready to land.Thu, Sep 10, 6:46 PM
douardda updated this revision to Diff 13829.Fri, Sep 11, 11:16 AM

rebase + fix test_cli

Build is green

Patch application report for D3921 (id=13829)

Rebasing onto d24a1e7732...

Current branch diff-target is up to date.
Changes applied before test
commit fd6d72f98ee8c79feaced17e44fe1076f71d0595
Author: David Douard <david.douard@sdfa3.org>
Date:   Thu Sep 10 15:15:33 2020 +0200

    cli: speedup the `swh` cli command startup time
    
    by moving import statements in functions, as well as preventing
    the loading of swh.storage.interface in swh.storage unless needed
    for type checking.
    
    Related to T2575.

See https://jenkins.softwareheritage.org/job/DSTO/job/tests-on-diff/918/ for more details.

This revision was automatically updated to reflect the committed changes.