Repository navigation
fix(domain): list a draft's sources in one pass over its statements - #495
Merged
Merged
Conversation
ixuz
force-pushed
the
fix/draft-listing-index
branch
from
November 2, 2026 10:24
fd52a35 to
0d1872b
Compare
draftLibraryDeck, which makes the Studio's listing of a draft, read the title, license and creators of each source the draft is drawn from by going over every statement of the draft, three times per source. Each source's own statements are among them, so a draft drawn from many sources took time that grows with their square, and the release diff and the trial, which make the listing several times, stopped responding on such a draft each time they were opened. The statements of the sources are now gathered by subject in one pass, as sourcesOf already does, and a source named twice is listed once. Growth tests hold the listing, the release diff and the learner upgrade to linear time in the number of sources. The draft's listing is also made fewer times: the release diff screen makes it once and hands it to releaseDiff and simulateLearnerUpgrade, and simulateLearnerUpgrade hands it on to draftLibraryContent. This saves repeated work rather than changing how the time grows. Refs: GHSA-6pp3-vp4m-5m87
ixuz
force-pushed
the
fix/draft-listing-index
branch
from
November 2, 2026 11:03
0d1872b to
592136c
Compare
ixuz
enabled auto-merge
November 2, 2026 11:03
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.
What and why
The Studio's listing of a draft (
draftLibraryDeck) found the title, license and creators of each of the draft's sources by going over every statement of the draft, several times per source. That work grew with the square of the number of sources. On a draft drawn from many sources, the release diff and the trial stopped responding each time they were opened, because each makes the listing more than once.This pull request:
draftLibraryDecknow gathers the sources' statements by subject in one pass, assourcesOfalready does. A source named twice is listed once.releaseDrafts.ts) makes the listing once and hands it toreleaseDiffandsimulateLearnerUpgrade, andsimulateLearnerUpgradehands it on todraftLibraryContent. Each takes it as an optional last parameter that defaults to making it, so existing callers don't change. This saves repeated work but doesn't change how the time grows.docs/testing.mdlists them in the domain row.For reviewers: this branch,
fix/graph-address-boundandfix/type-index-one-editeach add to the same domain row of the growth tests indocs/testing.md, so they conflict there. Merge them one at a time, and rebase each later branch onmainbefore merging it.Refs: GHSA-6pp3-vp4m-5m87
Checklist
Refs:, notCloses:. Leave this unchecked otherwise.npm run checkpasses (lint, Markdown and spelling included),npm run lint:reusetoo if a file was added, andnpm run crosschecktoo ifns/ordecks/changed. (lint:reuseandcrosscheckn/a: no file added,ns/anddecks/unchanged)docs/is listed in docs/docs.ttl.packages/ui/src/i18n/). (n/a: no message changed)ns/was agreed in an issue first; no publishedns/shapes/*/vN.ttlordecks/*/vN.ttlwas edited; generated files were regenerated, not edited. (n/a:ns/,decks/and generated files unchanged)!and aBREAKING CHANGE:footer).npm run check:breakingsees a line ofapi/that goes, but not a feature removed, nor a reader that reads less than before.npm run lint:reuse), or a new deck its line inREUSE.toml; third-party content is credited. (n/a: no file or deck added)npm run dev) and tried the change, and considered the user journeys.type(scope): subject,!and aBREAKING CHANGE:footer if it breaks something), with an imperative subject and a body that explains why (CONTRIBUTING.md).