Skip to content

Delete second checkPackageDescription call#10516

Merged
mergify[bot] merged 1 commit intohaskell:masterfrom
parsonsmatt:mattp/checkpkgdescr-once
Mar 15, 2025
Merged

Delete second checkPackageDescription call#10516
mergify[bot] merged 1 commit intohaskell:masterfrom
parsonsmatt:mattp/checkpkgdescr-once

Conversation

@parsonsmatt
Copy link
Collaborator

While diagnosing slow check times, I identified that file glob expansion was very slow, even on literal paths (#10495). This was made worse because Cabal would expand a glob four times for each extra-source-files line.

Fortunately, we can halve this easily: we call checkPackageDescription twice in checkGenericPackageDescription. This PR simply removes one of the calls in the function.

On our codebase, this patch has the effect of reducing the time spent expanding globs from 34s to 17s, bringing the time to do cabal repl --repl-options "-e ()" from 50s to 33s.

Template Α: This PR modifies behaviour or interface

Include the following checklist in your PR:

  • Patches conform to the coding conventions.
  • Any changes that could be relevant to users have been recorded in the changelog.
  • The documentation has been updated, if necessary.
  • Manual QA notes have been included.
  • Tests have been added. (Ask for help if you don’t know how to write them! Ask for an exemption if tests are too complex for too little coverage!)

Copy link
Collaborator Author

@parsonsmatt parsonsmatt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Collaborator

@ffaf1 ffaf1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very good find.

@ffaf1
Copy link
Collaborator

ffaf1 commented Nov 4, 2024

I don't think this requires a Template A, as it fixes a bug.

Copy link
Collaborator

@ulysses4ever ulysses4ever left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

Excuse us if we're slow in other PRs of yours: it's a release time for us. But we'll get there.

@parsonsmatt
Copy link
Collaborator Author

Y'all are reviewing these quickly, no worries at all! 😄 We will most likely be using a patched version while we wait for relesae, so there's no rush on our end.

@Mikolaj
Copy link
Member

Mikolaj commented Mar 13, 2025

This seems ready, right? @parsonsmatt: would you set a merge label?

@parsonsmatt parsonsmatt added the merge me Tell Mergify Bot to merge label Mar 13, 2025
@mergify mergify bot added ready and waiting Mergify is waiting out the cooldown period merge delay passed Applied (usually by Mergify) when PR approved and received no updates for 2 days labels Mar 13, 2025
@mergify mergify bot force-pushed the mattp/checkpkgdescr-once branch from 7c9e0de to 6708d51 Compare March 15, 2025 18:32
@mergify mergify bot merged commit 9b0a48c into haskell:master Mar 15, 2025
52 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cabal-install: cmd/check merge delay passed Applied (usually by Mergify) when PR approved and received no updates for 2 days merge me Tell Mergify Bot to merge ready and waiting Mergify is waiting out the cooldown period

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants