Skip to content

fix: requestIdleCallback won't be triggered when animation is playing - #1949

Closed
HawtinZeng wants to merge 2 commits into
antvis:releasefrom
HawtinZeng:master
Closed

fix: requestIdleCallback won't be triggered when animation is playing#1949
HawtinZeng wants to merge 2 commits into
antvis:releasefrom
HawtinZeng:master

Conversation

@HawtinZeng

Copy link
Copy Markdown

This is a Bug fix, test:browser is fine, but test:server is not ok as the result of the test in the antvis/g/master:
image

@wang1212
wang1212 changed the base branch from master to release June 5, 2025 05:12
@HawtinZeng

Copy link
Copy Markdown
Author

fixed #1948

@HawtinZeng

Copy link
Copy Markdown
Author

release 分支上 test:serverside 测试也是这个结果
image

this.syncRTree(true);
this.isFirstTimeRenderingFinished = true;
});
this.syncRTree(true);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

直接同步的执行,不知道会不会带来性能问题。

renderingService.hooks.endFrame.tap

这个 tap 是同步执行吧?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

我改一下

@hustcc

hustcc commented Jun 6, 2025

Copy link
Copy Markdown
Member

单测的截图是空白,是预期的嘛?

@wang1212

wang1212 commented Jun 6, 2025

Copy link
Copy Markdown
Member

单测的截图是空白,是预期的嘛?

这个属于已知问题,@HawtinZeng 提交的文件中删掉这个吧

@HawtinZeng HawtinZeng changed the title fix: rBush cannot load bulk data with animation is playing fix: requestIdleCallback won't be triggered when anmation is playing Jun 7, 2025
@HawtinZeng HawtinZeng changed the title fix: requestIdleCallback won't be triggered when anmation is playing fix: requestIdleCallback won't be triggered when animation is playing Jun 7, 2025
@wang1212

Copy link
Copy Markdown
Member

@HawtinZeng 看更新后的代码,似乎与原有的逻辑差不多,只是多了一个 timeout 300 的参数,能确认是这个原因导致的问题吗

@HawtinZeng

HawtinZeng commented Jun 10, 2025 via email

Copy link
Copy Markdown
Author

@wang1212

Copy link
Copy Markdown
Member

可能对首屏加载性能造成不利影响,需要再看看如何平衡性能与该问题

@wang1212
wang1212 deleted the branch antvis:release June 27, 2025 08:31
@wang1212 wang1212 closed this Jun 27, 2025
@HawtinZeng

HawtinZeng commented Jun 27, 2025 via email

Copy link
Copy Markdown
Author

@wang1212

wang1212 commented Jul 8, 2025

Copy link
Copy Markdown
Member

把初始化选择器放入 web worker里?

---Original--- From: @.> Date: Fri, Jun 27, 2025 16:20 PM To: @.>; Cc: "Hawtin @.@.>; Subject: Re: [antvis/G] fix: requestIdleCallback won't be triggered whenanimation is playing (PR #1949) wang1212 left a comment (antvis/G#1949) 可能对首屏加载性能造成不利影响,需要再看看如何平衡性能与该问题 — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>

当前的方案只是可能对首屏性能产生影响,同时部分浏览器目前还不支持 timeout 配置项;另外,web worker 难以适配多个环境,并且构建流程比较繁琐,不是最优方案。

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.

3 participants