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

Chart with a lot of markers lags when chart.update of a single candle is called #767

Closed
h0wXD opened this issue Jun 17, 2021 · 2 comments · Fixed by #879
Closed

Chart with a lot of markers lags when chart.update of a single candle is called #767

h0wXD opened this issue Jun 17, 2021 · 2 comments · Fixed by #879
Labels
bug Unexpected problem or unintended behavior.
Milestone

Comments

@h0wXD
Copy link

h0wXD commented Jun 17, 2021

Lightweight Charts Version: 3.3

Steps/code to reproduce:

Create a chart with a LOT of markers / chart data, the chart I am viewing has a total of 5747 markers, example image can be seen below.

Everything runs incredibly smooth when I don't call following method (once a second or let's say every 5 seconds), but when I do call update on the final candle to repaint, cursor, scrolling and dragging all hangs and it becomes very choppy.

Actual behavior:

It repaints every single marker, which takes around 300ms and the chart becomes unusable.

Expected behavior:

I would assume that it shouldn't touch any of the existing markers, unless there is a marker on the candle that was updated, then maybe it should update the marker position?

Screenshots:

chart with a lot of markers:
image

Devtools output when calling .update() with a single new candle:
image

CodeSandbox/JSFiddle/etc link:

@timocov
Copy link
Contributor

timocov commented Jun 17, 2021

Can you provide an example please which we can debug? Probably we can optimize it.

@timocov timocov added bug Unexpected problem or unintended behavior. needs investigation Needs further investigation. labels Jun 17, 2021
@timocov timocov added this to the 4.0 milestone Jun 17, 2021
@h0wXD
Copy link
Author

h0wXD commented Jun 18, 2021

@timocov Please find the example attached:
sample.zip

@timocov timocov modified the milestones: 4.0, 3.7 Oct 1, 2021
@timocov timocov removed the needs investigation Needs further investigation. label Oct 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Unexpected problem or unintended behavior.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants