-
-
Notifications
You must be signed in to change notification settings - Fork 83
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
Async indexing #371
Async indexing #371
Conversation
ec30636
to
bcc6185
Compare
I've tested it in a project which I couldn't use with Lexical because it was in an indexing loop. Using this branch it worked now and the LSP seems to be fully functional. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note: if you want to change a name, I'm fine with that, but that should be done in a separate PR. A lot of this one is just renaming refresh
to update
, which makes it a lot harder to review.
Yep, good point. I tend to best understand code by refactoring it, because it helps me understand what the code is doing and helps develop my mental model. In this particular case, I was initially thrown off by the use of refresh and update somewhat interchangeably, so I decided to normalize it to |
bcc6185
to
0b27017
Compare
Depending on the computer and size of the project being indexed, it was possible for indexing to take longer than the previous 20 second timeout. Additionally, since indexing was blocking the store GenServer, any calls made to the Store during a long indexing would be likely to time out (default GenServer call timeout is 5 seconds). This commit updates the `Store.State` API to load asynchronously so that the store can continue to respond while indexing occurs in a task, while the indexing itself has had its timeout changed to `:infinity`.
0b27017
to
72740f0
Compare
Depending on the computer and size of the project being indexed, it was possible for indexing to take longer than the previous 20 second timeout. Additionally, since indexing was blocking the store GenServer, any calls made to the Store during a long indexing would be likely to time out (default GenServer call timeout is 5 seconds).
This PR updates the
Store.State
API to load asynchronously so that the store can continue to respond while indexing occurs in a task, while the indexing itself has had its timeout changed to:infinity
.