antvis/G6

Do you want to work on this issue?

You can request for a bounty in order to promote it!

[Bug]: There are 1000 nodes in a single combo, it is slow when double-clicking to expand, and the combo cannot be closed after expanding #6730

sundongzi posted onGitHub

Describe the bug / 问题描述

单个combo中存在1000个节点,双击展开时很慢,展开后无法关闭combo

No response

Steps to Reproduce the Bug or Issue / 重现步骤

No response

G6 Version / G6 版本

🆕 5.x

OS / 操作系统

  • macOS
  • Windows
  • Linux
  • Others / 其他

Browser / 浏览器

  • Chrome
  • Edge
  • Firefox
  • Safari (Limited support / 有限支持)
  • IE (Nonsupport / 不支持)
  • Others / 其他

您提到的问题是关于在一个 combo 中包含 1000 个节点时,双击展开速度很慢,并且展开后无法关闭 combo。这个问题可能与大量节点的渲染和交互性能有关。

以下是一些可能的解决方案和建议:

  1. 性能优化

    • 确保使用最新版本的 G6,因为新版本通常会包含性能改进。
    • 尝试减少初始渲染的节点数量,或使用虚拟化技术来仅渲染可见节点。
    • 检查是否可以通过减少节点和边的复杂性来提高性能。
  2. 事件处理

    • 检查双击事件的处理逻辑,确保没有阻塞主线程的操作。
    • 确保 combo 的展开和关闭逻辑是异步的,以避免阻塞 UI。
  3. 内存管理

    • 确保在展开和关闭 combo 时正确管理内存,避免内存泄漏。

如果这些建议没有解决您的问题,您可以提供更多的上下文或代码示例,以便我能更具体地帮助您。

如果您希望将此问题提交为 GitHub 上的 issue,请告诉我,我可以为您协助提交。

<details> <summary>🪧 Tips</summary> For further assistance, please describe your question in the comments and @petercat-assistant to start a conversation with me. </details>

posted by petercat-assistant[bot] 3 months ago

Fund this Issue

$0.00
Funded
Only logged in users can fund an issue

Pull requests