Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

minor: Speed up fst items lookup during completions #9206

Merged
merged 2 commits into from
Jun 10, 2021

Conversation

SomeoneToIgnore
Copy link
Contributor

Part of #7542

A number of profile calls added for import_on_the_fly contents.
Before:
Screenshot 2021-06-11 at 00 19 13

After:
Screenshot 2021-06-11 at 00 19 27

As a result, low hanging fruit was spotted: crazy amount of fst_path calls. Reducing that won ~200ms in the import_on_the_fly @ sel case in the integrated_completion_benchmark:

Screenshot 2021-06-11 at 00 19 38

I'm not sure how to proceed with the remaining ??? marks in such methods as collect_import_map though: there's nothing but library calls in cycles, but maybe I'll come up with something later.

@SomeoneToIgnore
Copy link
Contributor Author

bors r+

@bors
Copy link
Contributor

bors bot commented Jun 10, 2021

@bors bors bot merged commit c4c1fcb into rust-lang:master Jun 10, 2021
@SomeoneToIgnore SomeoneToIgnore deleted the better-profiling branch June 10, 2021 21:37
@jonas-schievink
Copy link
Contributor

We might want to compute import maps when priming caches

@SomeoneToIgnore

This comment has been minimized.

bors bot added a commit that referenced this pull request Jun 11, 2021
9208: minor: Populate import maps eagerly to speed up flyimports r=SomeoneToIgnore a=SomeoneToIgnore

Part of #7542
Follow up of #9206 (comment)
Reduces `import_on_the_fly @ sel` case in the `integrated_completion_benchmark` by ~300ms.


Also enables cache priming for manual workspace loading to reflect the results in the benchmarks.

Before:
<img width="1198" alt="image" src="https://user-images.githubusercontent.com/2690773/121606148-4a734a80-ca56-11eb-812a-7955e93817f1.png">


After:
<img width="1200" alt="image" src="https://user-images.githubusercontent.com/2690773/121606156-4e06d180-ca56-11eb-891b-1ed878b53d7e.png">


Co-authored-by: Kirill Bulatov <mail4score@gmail.com>
@matklad
Copy link
Member

matklad commented Jun 11, 2021

Thanks for adding all thouse profile calls @SomeoneToIgnore !

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.

3 participants