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

fix(performance): optimize progressive rendering performance #15870

Merged
merged 8 commits into from
Oct 15, 2021

Conversation

pissang
Copy link
Contributor

@pissang pissang commented Oct 12, 2021

Brief Information

This pull request is in the type of:

  • bug fixing
  • new feature
  • others

What does this PR do?

Before this change for each frame during progressive rendering, we will traverse all elements in the storage to update z, blend, states, etc. Which brings lots of unnecessary extra cost because we only have to update the new rendered elements.

So this PR we add eachRendered method to traverse the new rendered elements in view/Chart.ts. And for the series that support progressive rendering will be responsible to manage which elements are rendered in this frame. When updating z, blend, states, we can simply use eachRendered instead of previously view.group.traverse.

Besides this major change. We also drop the use of IncrementalDisplayable. It seems to be an overdesign. We only use it in LargeSymbolDraw and LargeLineDraw. For these two cases, we can merge the points to reduce the number of elements. The code is simpler, and we can have tooltip and event on the large mode with progressive rendering now:)

Also we brings a new strategy to support special series being separated in an individual zlevel automatically. For example, progressively rendered scatter and lines series will be used so that they won't be affected when doing progressive rendering. And for a long time developers need to configure zlevel manually for lines with trail effect, now it can be done automatically.

@echarts-bot
Copy link

echarts-bot bot commented Oct 12, 2021

Thanks for your contribution!
The community will review it ASAP. In the meanwhile, please checkout the coding standard and Wiki about How to make a pull request.

The pull request is marked to be PR: author is committer because you are a committer of this project.

100pah
100pah previously approved these changes Oct 15, 2021
Copy link
Member

@100pah 100pah left a comment

Choose a reason for hiding this comment

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

LGTM

@pissang pissang merged commit 1a0492d into next Oct 15, 2021
@echarts-bot
Copy link

echarts-bot bot commented Oct 15, 2021

Congratulations! Your PR has been merged. Thanks for your contribution! 👍

@pissang pissang deleted the optimize-progressive branch October 15, 2021 10:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants