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

move isDrawCirclesEnabled check further up in code to avoid creating … #4050

Merged
merged 2 commits into from
Nov 11, 2019

Conversation

xymtek
Copy link
Contributor

@xymtek xymtek commented Jun 28, 2019

…accessibility labels that will never appear anyway. Reduces CPU significantly for larger datasets.

Goals ⚽

Improve draw performance for larger datasets.

Implementation Details 🚧

No need to create accessibility labels for each circle if the circle will never be drawn away.

Testing Details 🔍

After this change drawing and updating 4500 points every 200ms the cpu went from approximately 130% down to about 35%

…accessibility labels that will never appear anyway. Reduces CPU significantly for larger datasets.
Copy link

@paulsUsername paulsUsername left a comment

Choose a reason for hiding this comment

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

Looks perfect! Will definitely help those of us with large datasets.

@JimmyMAndersson
Copy link

This will do wonders. Any idea of when it can be merged and released?

@liuxuan30
Copy link
Member

liuxuan30 commented Nov 11, 2019

sorry guys for the late. It will be merged now.

@liuxuan30 liuxuan30 merged commit eb0acae into ChartsOrg:master Nov 11, 2019
water-su added a commit to water-su/Charts that referenced this pull request Feb 7, 2020
* origin/master: (256 commits)
  Add our first super sponsor!
  Updated test screenshots
  Add option to draw grid lines in front of data
  Removed double spacing for labelRotatedHeight
  Fixes an issue with string comparison in ChartData for finding a dataset by its label (Fixes ChartsOrg#4274)
  Simplify code
  Use faster check for line whether it's inside drawing rect
  Corrected pie `isHighlightEnabled` - render normally when disabled
  Restored correct velocity sampler
  Deduplicate BalloonMarker code
  Unified styling
  Call chartViewDidEndPanning on when *panning* is ended
  Propagate file header to newer files
  Removed redundant minEntries > 0
  labelXOffset = 10 is default for radar chart only
  Update README.md, added link to tutorial about Radar Charts.
  Changes to fix Catalyst compatibility
  Allowing overrides for YAxisRenderer.drawYLabels (ChartsOrg#4089)
  move isDrawCirclesEnabled check further up in code to avoid creating … (ChartsOrg#4050)
  Platform separation (ChartsOrg#4178)
  ...

# Conflicts:
#	Source/Charts/Components/AxisBase.swift
#	Source/Charts/Data/Implementations/Standard/LineRadarChartDataSet.swift
#	Source/Charts/Highlight/Highlight.swift
SwiftPolar pushed a commit to SwiftPolar/Charts that referenced this pull request Mar 20, 2023
ChartsOrg#4050)

* move isDrawCirclesEnabled check further up in code to avoid creating accessibility labels that will never appear anyway.  Reduces CPU significantly for larger datasets.
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.

None yet

4 participants