Opened 6 years ago

Closed 6 years ago

#21290 closed defect (fixed)

Optimize list_packages

Reported by: jdemeyer Owned by:
Priority: major Milestone: sage-7.4
Component: misc Keywords:
Cc: vdelecroix Merged in:
Authors: Jeroen Demeyer Reviewers: Vincent Delecroix
Report Upstream: N/A Work issues:
Branch: 1fb82d7 (Commits, GitHub, GitLab) Commit: 1fb82d7ff069acf6f266ca966dbcd79b7d7c9872
Dependencies: Stopgaps:

Status badges

Description (last modified by jdemeyer)

This is needlessly slow because of the additional isfile() check:

        elif os.path.isfile(package_filename):
            with open(package_filename) as f:

Just open the file...

Note: in practice, it does not matter a lot and it does not really speed up list_packages().

Change History (4)

comment:1 Changed 6 years ago by jdemeyer

  • Branch set to u/jdemeyer/optimize_list_packages

comment:2 Changed 6 years ago by jdemeyer

  • Commit set to 1fb82d7ff069acf6f266ca966dbcd79b7d7c9872
  • Description modified (diff)
  • Status changed from new to needs_review

New commits:

1fb82d7Minor optimizations to list_packages()

comment:3 Changed 6 years ago by vdelecroix

  • Reviewers set to Vincent Delecroix
  • Status changed from needs_review to positive_review

comment:4 Changed 6 years ago by vbraun

  • Branch changed from u/jdemeyer/optimize_list_packages to 1fb82d7ff069acf6f266ca966dbcd79b7d7c9872
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.