Skip to content

feat: Queue client-mode scene updates and skip the rebuild for data-only updates - #202

Open
LKasianAnsys wants to merge 3 commits into
feat/geometry-picker-for-server-modefrom
feat/client-update-queue
Open

LKasianAnsys wants to merge 3 commits into
feat/geometry-picker-for-server-modefrom
feat/client-update-queue

Conversation

@LKasianAnsys

@LKasianAnsys LKasianAnsys commented Nov 3, 2026 •

Copy link
Copy Markdown
Collaborator

Issue

Addresses #192

Summary

In a future PR, the client and server rendering modes will share a mechanism for geometry picking and highlighting. Client mode will be updated to use the new server-mode geometry picking mechanism. This will introduce a round trip from the client to the server on every geometry pick. However, before introducing these round trips, we first need an optimization.

Until now, every server push in client mode applied its update to the wasm scene and then rebuilt the frontend, and the pushes could overlap. With this PR, updates now run one in series, and pushes that arrive during one merge into a single pending update, which rebuilds once if any of them was structural.

Changes (client mode only; server mode is unaffected)

  • Server updates now go through a new SerialUpdateQueue and run one at a time.
  • Pushes that arrive while an update is running merge into one pending update. The latest options win, and every caller gets the same promise. The frontend rebuilds once if any merged push was structural.
  • An update sent with dataOnly is applied and redrawn without a frontend rebuild. This is parsed by the new WasmUpdateOptions.
  • A failed update skips its rebuild and does not block the next one.

Files

  • RemoteVtkScene.js: updateAsync now goes through the queue. The apply and listener-notify steps are split out.
  • SerialUpdateQueue.ts and WasmUpdateOptions.ts: new.
  • Unit tests cover the queue and the option parsing.

@github-actions github-actions Bot added added enhancement New feature or request labels Nov 3, 2026
@LKasianAnsys
LKasianAnsys changed the base branch from feat/geometry-picker-for-server-mode to main November 3, 2026 16:34
@LKasianAnsys
LKasianAnsys changed the base branch from main to feat/geometry-picker-for-server-mode November 3, 2026 16:34
@LKasianAnsys
LKasianAnsys added this pull request to stack #197 November 3, 2026 16:34
@LKasianAnsys LKasianAnsys changed the title feat: skip the frontend for data-only updates in client mode feat: Queue client-mode scene updates and skip the rebuild for data-only updates Nov 3, 2026
@LKasianAnsys
LKasianAnsys force-pushed the feat/client-update-queue branch 6 times, most recently from 3ba4343 to 4160784 Compare November 5, 2026 14:45
@LKasianAnsys LKasianAnsys self-assigned this Nov 5, 2026
@LKasianAnsys
LKasianAnsys force-pushed the feat/client-update-queue branch from 4160784 to 0daac05 Compare November 5, 2026 15:33
@LKasianAnsys
LKasianAnsys marked this pull request as ready for review November 5, 2026 16:35
@LKasianAnsys LKasianAnsys mentioned this pull request Nov 5, 2026

@ansBAkula ansBAkula left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested and no regressions on client side functionality.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

added enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants