Skip to content

Speed up Pkg.status and Pkg.add#4651

Draft
IanButterworth wants to merge 1 commit intoJuliaLang:masterfrom
IanButterworth:ib/faster
Draft

Speed up Pkg.status and Pkg.add#4651
IanButterworth wants to merge 1 commit intoJuliaLang:masterfrom
IanButterworth:ib/faster

Conversation

@IanButterworth
Copy link
Copy Markdown
Member

  • Eliminate redundant EnvCache() construction in show_update by building the struct directly from existing fields instead of re-reading/parsing Project.toml and Manifest.toml from disk
  • Add snapshot_originals kwarg to EnvCache to skip deepcopy of project/manifest for read-only sub-environments (collect_developed!)
  • Pre-build reverse dependency map in print_status to avoid O(n²) manifest scanning in status_compat_info
  • Use Dict-based UUID lookup in diff_array instead of O(n) findfirst

- Eliminate redundant EnvCache() construction in show_update by
  building the struct directly from existing fields instead of
  re-reading/parsing Project.toml and Manifest.toml from disk
- Add snapshot_originals kwarg to EnvCache to skip deepcopy of
  project/manifest for read-only sub-environments (collect_developed!)
- Pre-build reverse dependency map in print_status to avoid O(n²)
  manifest scanning in status_compat_info
- Use Dict-based UUID lookup in diff_array instead of O(n) findfirst

Co-authored-by: Claude <noreply@anthropic.com>
@KristofferC
Copy link
Copy Markdown
Member

Eliminate redundant EnvCache() construction in show_update by building the struct directly from existing fields instead of re-reading/parsing Project.toml and Manifest.toml from disk

These should not have to be touch
disk because we have a cache for toml files so if the same file is read twice and it is not changed it should give the cached dictionary. Still better not to have to do it though.

Any perf numbers?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: New

Development

Successfully merging this pull request may close these issues.

2 participants