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

enhancement: dont draw hittest when viewport animation is active #133

Merged
merged 10 commits into from
Jan 22, 2024

Conversation

Keelaro1
Copy link
Contributor

No description provided.

@Keelaro1
Copy link
Contributor Author

Tested with histogram chart type and 1h period, if zoom out to 1000 candles even single chart makes performance bad :)
Before and after

chrome_HHleiYZgVk chrome_wVo1zfnclq

@disyakidneyshot disyakidneyshot added the enhancement New feature or request label Jan 16, 2024
@@ -61,6 +63,14 @@ export class HitTestCanvasModel extends CanvasModel {
initCanvasWithConfig(this, chartConfig);
canvas.style.visibility = 'hidden';
this.enableUserControls();
this.canvasAnimation.animationIntervalIdSubject.subscribe(() => {
Copy link
Contributor

Choose a reason for hiding this comment

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

memory leak, no unsubsrcribe call

src/chart/animation/canvas-animation.ts Outdated Show resolved Hide resolved
src/chart/animation/canvas-animation.ts Outdated Show resolved Hide resolved
@KirillBobkov
Copy link
Contributor

Please, add new profiler screenshot after new changes will be applied

@Keelaro1
Copy link
Contributor Author

The new result, single chart, candle chart type, 1h period, added 5 studies (Average Directional Index), maximum zoom out:

chrome_ZDW2fnBJB2 chrome_MkcADl4388

src/chart/model/scale.model.ts Outdated Show resolved Hide resolved
@disyakidneyshot disyakidneyshot merged commit 8070115 into master Jan 22, 2024
2 checks passed
@disyakidneyshot disyakidneyshot deleted the animation-hittest-draw-optimization branch January 22, 2024 09:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants