Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Only return the neccessary info using maple --number option #181

Merged
merged 9 commits into from
Dec 27, 2019

Conversation

liuchengxu
Copy link
Owner

@liuchengxu liuchengxu commented Dec 26, 2019

With this PR, the async job only returns the minimal info we care if you are using maple:

  • total filtered number.
  • top N items' text as well as their fuzzy indices.

This PR mostly resolves the performance issue in #140 , at least vim should be able to keep responsive even when you search at scale, except the initial forerunner job caching:

if writefile(s:chunks, tmp) == 0

Writing 1 million lines to a tmp file costs 5 seconds on my machine, which becomes the main bottleneck once this PR is merged. The good news is that this writing happens only once per vim-clap session and I can move this heavy job into the maple extension later.

Return:

- total filtered number.
- top N items' text as well as their fuzzy indices.
@liuchengxu liuchengxu mentioned this pull request Dec 26, 2019
4 tasks
@liuchengxu liuchengxu merged commit 3eebb7d into master Dec 27, 2019
@delete-merged-branch delete-merged-branch bot deleted the minimalize-async-job-payload branch December 27, 2019 13:05
liuchengxu pushed a commit that referenced this pull request Aug 17, 2021
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant