Repository navigation
perf(wab): read the merge's head pkg versions without loading their model - #172
Closed
jameswillis99 wants to merge 1 commit into
Closed
jameswillis99 wants to merge 1 commit into
jameswillis99 wants to merge 1 commit into
Conversation
|
@jwillis24 is attempting to deploy a commit to the Plasmic Team on Vercel. A member of the Team first needs to authorize it. |
|
Thank you for your submission, we really appreciate it! ❤️ Like many open-source projects, we ask that you sign our Individual Contributor License Agreement before we can accept your contribution. If you are contributing on behalf of a company, please contact us at help@plasmic.app to sign a Corporate Contributor License Agreement. You can sign the individual CLA by posting a comment with the below text. I have read, agree to, and hereby sign Plasmic's Individual Contributor License Agreement You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot. |
jameswillis99
force-pushed
the
perf/merge-head-pkg-versions-without-model
branch
from
October 8, 2026 09:46
66d6db8 to
d017917
Compare
…odel The merge uses only id, version and revisionId of the to and from head pkg versions, so getPkgVersionHead selects just those through the version-only lookup and skips the model column.
jameswillis99
force-pushed
the
perf/merge-head-pkg-versions-without-model
branch
from
October 8, 2026 09:47
d017917 to
2d12282
Compare
Contributor
|
Fixed in a4e0313. |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Summary
The merge reads only
id,versionandrevisionIdfrom the to and from head pkg versions, butgetPkgVersionloads each whole row, including the project-sizedmodelcolumn (about 8 MB each on a project with a 4 MB main revision). A new privategetPkgVersionHeadreads them through the version-only mode fromcb401ee18, which skips themodelcolumn.The version-only projection gains
revisionId, which the merge compares with the latest revision id.getLatestPkgVersionNumbershares that projection, so its query selects one more small column. Same permission checks and not-found messages asgetPkgVersion. The two prefill reads are not changed.A new spec in
branching.spec.tschecks that a merge preview reads one pkg versionmodelrow (the ancestor's) from the database instead of three.Evidence
modelrow from Postgres (the ancestor's, which the merge needs) instead of 3. On a project with a 4 MB main revision, that is 8.3 million fewer characters read per merge call. The new spec fails without the change.master.Merge Danger
Door: two-way
Blast Radius: branch merge. The loader's version-only query selects one more small column (
revisionId, 37 bytes a row). The head objects are typed asPick<PkgVersion, "id" | "version" | "revisionId">, so a later edit that reads.modelfrom them fails to compile.