Repository navigation
perf(server): onshape syncs after an assembly edit make 5x fewer api calls - #235
Merged
Merged
Conversation
…t syncs from 11 api calls to 2
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
…ores, and versioned parts
This branch was previously deployed
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.
Every Onshape sync after a document edit cost 11 API calls, the same as a first import. A new microversion discarded everything, so the importer reread the definition and BOM, re-exported the whole assembly as 3MF, and refetched every ambiguous part. The first Sync click also spent 2 calls on catalog discovery.
Syncs now reuse whatever did not change. Each Part Studio's element
microversionIdserves as its revision. Parts from unchanged studios carry their previous geometry and metadata forward, and linked parts carry forward by their versioned geometry keys. When every part carries forward, the BOM is skipped. When only a few studios need geometry, they are fetched directly instead of through the 3MF export.Changes:
currentmicroversionread.Verification
onshape-request-experiment.tsgained edit, other-project, and subassembly phases with per-phase request limits. An offline replay of the live recording reproduces every count.vpr typecheckandvp checkare clean, and all 1,733 server tests pass.Limitations
Proved with live Onshape runs, an offline replay that asserts each phase's request count, and focused regression tests.
Reviewed with sol-loop: 2 rounds with gpt-6.1-sol. Sol verdict: approved
Also reviewed by Claude Fable 5.1, Gemini 4 Argon, and Grok 4.7. Their findings are fixed or declined below.
microversionIdis now a stand-in hash