Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛vue版本大数据时卡顿 #2078

Closed
1 of 5 tasks
hbyhby opened this issue Feb 17, 2023 · 6 comments
Closed
1 of 5 tasks

🐛vue版本大数据时卡顿 #2078

hbyhby opened this issue Feb 17, 2023 · 6 comments
Assignees

Comments

@hbyhby
Copy link

hbyhby commented Feb 17, 2023

vue版本大数据时卡顿

🏷 Version

Package Version
@antv/s2 1.41.0
@antv/s2-react 1.36.0
@antv/s2-vue 1.5.0

Sheet Type

  • PivotSheet
  • TableSheet
  • GridAnalysisSheet
  • StrategySheet
  • EditableSheet

🖋 Description

vue版本大数据情况卡顿

1.vue版本中,数据过多时,页面更新延迟。 hooks-> useResize. s2Ref 的 deep watch 导致
2. hooks 对应地址 antvis/S2/packages/s2-vue/src/hooks/useResize.ts

⌨️ Code Snapshots

 watch(
    [s2Ref, () => props.adaptive],
    ([s2, adaptive], _, onCleanup) => {
      if (!s2) {
        return;
      }
      unobserve.value = createResizeObserver({
        s2,
        adaptive,
        wrapper: dom.wrapperRef.value!,
        container: dom.containerRef.value!,
      });

      onCleanup(() => {
        unobserve.value?.();
      });
    },
    { deep: true },
  );

🔗 Reproduce Link

🤔 Steps to Reproduce

😊 Expected Behavior

😅 Current Behavior

💻 System information

Environment Info
System
Browser
@github-actions
Copy link
Contributor

你好 @hbyhby,请编辑你的 issue 标题, 一个言简意赅的 issue 标题可以节省大家的时间, 请不要将标题当做正文, 或者为空。

Hello, @hbyhby, please edit your issue title. a concise issue title will save everyone time. please do not leave the title as the body or empty.

@hbyhby hbyhby changed the title 🐛 🐛vue版本大数据时卡顿 Feb 17, 2023
@lcx-seima lcx-seima added the 🤔 need reproduce 需要一个在线复现链接 label Feb 17, 2023
@github-actions
Copy link
Contributor

你好 @hbyhby,请提供一个可以在线访问的链接, 或者使用 codesandbox 提供示例并详细说明复现步骤 (查看更多模板), 15 天内未回复issue自动关闭。

Hello, @hbyhby, please provide an accessible link or usage codesandbox to describe the reproduction steps (more template). The issue will be closed without any replay within 15 days.

@lcx-seima lcx-seima self-assigned this Feb 17, 2023
@hbyhby
Copy link
Author

hbyhby commented Feb 17, 2023

不好意思没有外部链接,但是感觉这块是不合理的对SpreadSheet实例做 deep watch。vue3 deep watch 在其他属性改变时会对监控数据为数组的监控做递归遍历,导致之后的其他属性改动都会因为这个数据量过大而导致延迟 --粗略看了下。

@github-actions github-actions bot removed the 🤔 need reproduce 需要一个在线复现链接 label Feb 17, 2023
@lcx-seima
Copy link
Contributor

这个地方应该不影响(s2外层是shallowref),如果频繁变动 useResize 里应该会执行多次吧。目前我本地看没发现这样的现象。

@hbyhby
Copy link
Author

hbyhby commented Feb 20, 2023 via email

@hbyhby
Copy link
Author

hbyhby commented Feb 20, 2023 via email

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

No branches or pull requests

2 participants