Skip to content

Conversation

OpportunityLiu
Copy link
Contributor

Description

Motivation and Context

#3669

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Enhancement (changes that improvement of current feature or performance)
  • Refactoring (changes that neither fixes a bug nor adds a feature)
  • Test Case (changes that add missing tests or correct existing tests)
  • Code style optimization (changes that do not affect the meaning of the code)
  • Docs (changes that only update documentation)
  • Chore (changes that don't modify src or test files)

Self Check before Merge

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@x6-bot x6-bot bot added pkg:x6 labels Mar 29, 2024
@codecov-commenter
Copy link

codecov-commenter commented Mar 29, 2024

Codecov Report

❌ Patch coverage is 14.28571% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 10.29%. Comparing base (bdfdadd) to head (0922873).
⚠️ Report is 4 commits behind head on master.

Files with missing lines Patch % Lines
packages/x6/src/graph/virtual-render.ts 16.66% 5 Missing ⚠️
packages/x6/src/graph/graph.ts 0.00% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #4243   +/-   ##
=======================================
  Coverage   10.29%   10.29%           
=======================================
  Files         180      180           
  Lines       10620    10620           
  Branches     2590     2590           
=======================================
  Hits         1093     1093           
  Misses       9438     9438           
  Partials       89       89           
Flag Coverage Δ
x6 10.29% <14.28%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
packages/x6/src/graph/graph.ts 14.46% <0.00%> (ø)
packages/x6/src/graph/virtual-render.ts 19.04% <16.66%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@hustcc
Copy link
Member

hustcc commented Aug 12, 2025

@OpportunityLiu 这个 PR 改动比较多,可以在描述中增加一些问题描述,结局思路,以及前后对照的 gif 嘛?

@OpportunityLiu
Copy link
Contributor Author

这不就吧 scroll 的视口计算和变化事件暴露出去,然后就和普通的 virtual 没啥区别吗?

截图也看不出来啥吧

@OpportunityLiu
Copy link
Contributor Author

OpportunityLiu commented Aug 12, 2025

反正我们就靠这些顶到 10k 节点的

https://cloudpss.net/dslab/diagram?simu_id=0be31156-f28a-49b6-aa87-3159f6

但是这里面改的可就不止这点了,整个 renderer 我都全重写了

@hustcc
Copy link
Member

hustcc commented Aug 12, 2025

这不就吧 scroll 的视口计算和变化事件暴露出去,然后就和普通的 virtual 没啥区别吗?

截图也看不出来啥吧

看起来改动代码不少啊,现在也没有单元测试,有点不放心🤦‍♂️

@hustcc
Copy link
Member

hustcc commented Aug 12, 2025

反正我们就靠这些顶到 10k 节点的

https://cloudpss.net/dslab/diagram?simu_id=0be31156-f28a-49b6-aa87-3159f6

但是这里面改的可就不止这点了,整个 renderer 我都全重写了

感觉这个优化很有价值啊,之前内部做 x6 和 react flow 的性能对比,没啥优势啊~

@hustcc
Copy link
Member

hustcc commented Aug 13, 2025

思路参考:#2988

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants