Skip to content

Conversation

simula-r
Copy link
Contributor

@simula-r simula-r commented Sep 18, 2025

Summary

Replaced reactive (Vue-based) widget LOD with CSS visibility control. Performance doesn't dramatically improve, but we avoid the mount/unmount overhead during zoom/pan operations. This PR implements the visual component of LOD—complex widgets that need lifecycle management will be addressed separately.

Problem & Solution

Problem: we want LOD to improve rendering performance and visual feedback but discovered using reactivity in the current setup for it meant mounting/unmounting caused worse lag than the performance it aimed to fix. Switching to render all the details all the time but using css visibility proved to be the best solution. However, it doesn't improve rendering performance by much because the GPU texture size is the bottleneck (from TransformPane.vue CSS transforms) and not rasterization.

Solution: Keep all nodes/widgets mounted, use CSS visibility: hidden for LOD. Trade memory for performance stability during zoom/pan/drag operations.

Technical Decision

We chose Performance > Memory:

  • CSS transforms create a single GPU texture whose size depends on node count, not widget complexity
  • Mounting/unmounting hundreds of widgets during zoom = noticeable lag from Vue VDOM diffing (since all components are mounted all the time because of viewport culling challenge/trade off see Fix/vue nodes viewport culling #5510.)
  • CSS visibility changes = no reactivity overhead, smooth interactions
  • Result: Similar performance, but without interaction stutters

This is the visual layer only. If we want a hook into the LOD state per node / widget that would be the next follow up system to implement.

Next Steps (maybe)

  • Chunked (split up single Transform Pane transform layer) when rendering 1000+ nodes (maybe)
  • Selective unmounting API for widgets that register as "expensive"
  • Client bound hydration system

Screenshots (if applicable)

image image

┆Issue is synchronized with this Notion page by Unito

@simula-r simula-r requested review from a team as code owners September 18, 2025 03:03
@dosubot dosubot bot added the size:XXL This PR changes 1000+ lines, ignoring generated files. label Sep 18, 2025
@simula-r simula-r marked this pull request as draft September 18, 2025 03:03
Copy link

github-actions bot commented Sep 18, 2025

🎭 Playwright Test Results

Some tests failed

⏰ Completed at: 09/23/2025, 02:22:17 AM UTC

📈 Summary

  • Total Tests: 457
  • Passed: 424 ✅
  • Failed: 2 ❌
  • Flaky: 2 ⚠️
  • Skipped: 29 ⏭️

📊 Test Reports by Browser

  • chromium: View Report • ✅ 417 / ❌ 2 / ⚠️ 2 / ⏭️ 29
  • chromium-2x: View Report • ✅ 2 / ❌ 0 / ⚠️ 0 / ⏭️ 0
  • chromium-0.5x: View Report • ✅ 1 / ❌ 0 / ⚠️ 0 / ⏭️ 0
  • mobile-chrome: View Report • ✅ 4 / ❌ 0 / ⚠️ 0 / ⏭️ 0

🎉 Click on the links above to view detailed test results for each browser configuration.

Copy link

🔧 Auto-fixes Applied

This PR has been automatically updated to fix linting and formatting issues.

⚠️ Important: Your local branch is now behind. Run git pull before making additional changes to avoid conflicts.

Changes made:

  • ESLint auto-fixes
  • Prettier formatting

@simula-r simula-r marked this pull request as ready for review September 18, 2025 21:44
@DrJKL DrJKL self-assigned this Sep 18, 2025
@DrJKL DrJKL assigned simula-r and unassigned DrJKL Sep 18, 2025
@christian-byrne
Copy link
Contributor

Looking good, just some merge conflicts it seems

@simula-r
Copy link
Contributor Author

simula-r commented Sep 19, 2025

Looking good, just some merge conflicts it seems

Yep. Will fix that along with more feedback implementations.
Lets wait to merge until there in.

@simula-r simula-r added the New Browser Test Expectations New browser test screenshot should be set by github action label Sep 22, 2025
@simula-r simula-r added New Browser Test Expectations New browser test screenshot should be set by github action and removed New Browser Test Expectations New browser test screenshot should be set by github action labels Sep 23, 2025
@simula-r simula-r removed the New Browser Test Expectations New browser test screenshot should be set by github action label Sep 23, 2025
@simula-r simula-r added the New Browser Test Expectations New browser test screenshot should be set by github action label Sep 23, 2025
@christian-byrne christian-byrne merged commit cec1de0 into main Sep 23, 2025
2 checks passed
@christian-byrne christian-byrne deleted the feat/vue-nodes-lod branch September 23, 2025 03:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
New Browser Test Expectations New browser test screenshot should be set by github action size:XXL This PR changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants