Repository navigation
Improve the tbdocs build performance. - #274
Merged
Merged
Conversation
…ut), not on threads of their own; the archive is deflated while the index is built, and a large file in primed 1 MB pieces
…only zlib's Sync functions, by name
…that no task starts a thread
…hat state a packed file's size, whose render chunks wait for downloadSizes
… the search entries, and pack the entries for search-data.json and the index's lanes; symbolPlace, searchEntries and indexSlices are what is left between the last chunk and the first indexAdd
…tries, and what the lanes wait for after the last render chunk
…ist, discoverRead:i, discover), which take a piece after the first stage of their boot; test/discover.test.mjs
…t, and what reading the source tree on the lanes gained
…(builder/fnmatch.mjs), which was most of dispatch; its tests in test/discover.test.mjs
…uffer (packPageText), and a render chunk's payload names where each page's text is instead of holding it
…t dispatch's submit took
… placeholder, maskCode finds line ends and backticks without reading each character, and the package tests' folders are listed once
…levels and the children list, and the walk carries the levels; its tests in test/discover.test.mjs
…itle page reads (bookPayload waits for it), and the source tree is read in four pieces on a machine with eight or more CPUs
… count, and what nav gains
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fanOut) instead of on threads of their own, andsearch-index-worker.mjsis gone. The archive is deflated while the index is built, and a large file in 1 MB pieces, each primed with the 32 KB before it. A new lint rule keeps it so: no task of the build starts a thread, andbuilder/andlib/import only zlib'sSyncfunctions, by name.packTestsruns on a lane, and no page waits for it but those that state a packed file's size (their render chunks wait fordownloadSizes). The render lanes do the per-page part of the symbol index and the search entries and pack the entries forsearch-data.jsonand the index's lanes, sosymbolPlace,searchEntriesandindexSlicesare all that is left between the last chunk and the firstindexAdd.discoverList,discoverRead:i,discover): two pieces, or four on a machine with eight or more CPUs, which a lane takes after the first stage of its boot. The lanes pack their pages' text into a shared buffer (packPageText), so a render chunk's payload names where each page's text is instead of holding it.dispatch: theoffline_excludepatterns are compiled once for each list (builder/fnmatch.mjs), which was most of it (about 0.6 s on CI before, about 0.1 s after). It no longer waits forbuildInfo, which only the book's title page reads (bookPayloadwaits for it).findCountRefscuts into code spans only the lines that hold a placeholder,maskCodefinds line ends and backticks without reading each character, and the package tests' folders are listed once.computeNavsorts each page's children once, for the tree, the levels and the children list, and its walk carries the levels.test/discover.test.mjsis new (the inventory in any number of pieces,matchesAny,computeNav) and runs intest.batand CI; the search, search-index, render and add-in project tests follow the changes. Pipeline Stages, tbdocs Internals, WIP.Build.md, WIP.Search.md and the scheduler diagram describe each task and what it gained.