-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Allow passing typed array of ms timestamps for date
axis without conversions
#6269
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
Comments
I too noticed that Date formatting was limiting my performance. Did a stress test and saw The following screenshots are the same code with just the axis type changed: This is a stress test of a real time plot with a firehose data rate. Eventually my plot updates start breaking and some datapoints fail to get updated. Notice the gaps in the orange trace on the right. I probably have done thing suboptimally, but I think the point holds. You can see with my demo the I would have expected a workaround to be use |
Hi - we are trying to tidy up the stale issues and PRs in Plotly's public repositories so that we can focus on things that are still important to our community. Since this one has been sitting for several years, I'm going to close it; if it is still a concern, please add a comment letting us know what recent version of our software you've checked it with so that I can reopen it and add it to our backlog. Thanks for your help - @gvwilson |
Not specifically asking for this to be reopened, but did want to provide an update (based on the previous comment about if it is still a concern) that this still impacts rendering as as of version 3.0.1. We have some users that can generate graphs with 100k+ datapoints in one of our applications, and even though the timestamps are already in ms format, about 50% of the rendering time is spent on the conversion logic being called from If anyone comes across this thread, and is looking for a somewhat "hacky" solution to the problem, you can patch this:
with this:
and it resolves the issue. There may be side effects, but I have not seen any yet, so YMMV. |
@LiamConnors worth adding to docs? |
I need to handle a large number of data points, and I also need
lines
mode (notmarkers
) so I'm using a "fancy" scattergl plot. Annoyingly, there appears to be no way to just feed ms epoch timestamps to plotly directly as a date axis value (say, as aBigUint64Array
)... as a result, there's a huge added overhead added for parsingDate
inputs (the most effcient thing it seems to accept currently) back into ms timestamps.There is seemingly a shortcut here:
but the
opts
are not passed through frommakeCalcdata
call in scattergl - no way to opt-in for this as a user.TypedArray is currenty allowed for
linear
andlog
axis types here, butdate
axis just falls through to callingdt2ms
, and ultimately to the terribly slow (even forDate
inputs, when you need to proccess hundreds of thousands points)dateTime2ms
. It is so frustrating there is no way to pass through exactly what is produced in the result anyway.The text was updated successfully, but these errors were encountered: