Skip to content

Parallel fuzzy filtering#2225

Merged
pepeiborra merged 6 commits into
masterfrom
parallel-fuzzy
Sep 22, 2021
Merged

Parallel fuzzy filtering#2225
pepeiborra merged 6 commits into
masterfrom
parallel-fuzzy

Conversation

@pepeiborra

@pepeiborra pepeiborra commented Sep 21, 2021

Copy link
Copy Markdown
Collaborator

Following #2215 and #2217 this is another performance improvement to completions driven by the large Sigma codebase.

On every completion attempt we need to match the prefix against all the identifiers in the project, with a cost of O(Identifiers*C) where C is the average number of characters per identifier. This PR parallelises the matching and uses vectors to reduce the amount of allocations and enable in-place sorting of the results.

Comment thread ghcide/ghcide.cabal Outdated
@pepeiborra
pepeiborra marked this pull request as ready for review September 21, 2021 20:49
Comment thread ghcide/src/Development/IDE/Plugin/Completions/Logic.hs

@jneira jneira left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Not sure if there are existing tests which might be changed to cover changes, i let it to your consideration

@pepeiborra

Copy link
Copy Markdown
Collaborator Author

Not sure if there are existing tests which might be changed to cover changes, i let it to your consideration

All the completions test suite cover these changes

@jneira jneira added the merge me Label to trigger pull request merge label Sep 22, 2021
@pepeiborra pepeiborra removed the merge me Label to trigger pull request merge label Sep 22, 2021
@pepeiborra
pepeiborra merged commit 2b9cce5 into master Sep 22, 2021
@pepeiborra
pepeiborra deleted the parallel-fuzzy branch September 22, 2021 14:29
pepeiborra added a commit that referenced this pull request Sep 23, 2021
* Revert "Inline Text.Fuzzy to add INLINABLE pragmas (#2215)"

This reverts commit 2869077.

* Fuzz in parallel

* Efficiently with vectors

* use mapMaybe for compat. with older versions

* switch to stable sort

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants