-
-
Notifications
You must be signed in to change notification settings - Fork 96
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
racket-describe-search: Various improvements
1. Redesign to be lazy and incremental: Previously we eagerly built a data structure for all xref-index items, to use as the completion-table. Because computing and transferring this to the front end could be slow, we had a couple layers of caching. Instead: Use a new "doc-search" back end command much like Emacs' `all-completions`, which returns data for items matching a prefix. It is backed by a doc index fully stored only on the back end server. The index is organized as a trie. Furthermore, although the entire trie is built eagerly so it knows all keys, the values for each node are computed lazily. 2. Implement something like the package and sorting ("base" vs. "main-dist" vs. other) recently added to web doc search. Since AFAICT we must use resolve-module-path and pkg->path, which can be somewhat slow, the new lazier design helps even more here. These details are calculated only when a user prefix matches those items. 3. Re-implement module-doc-path for package details, as well as the racket-add-require-for-identifier command, in terms of the new trie index. In fact the latter command now shares the completing-read UX of racket-describe-search -- the only difference being the final action is to insert a require statement, rather than to visit a doc page.
- Loading branch information
1 parent
71f9046
commit 6d8a0dc
Showing
9 changed files
with
477 additions
and
376 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.