Skip to content

Performance Issues with large data sets since 2.x.x #5790

Closed

Description

@sean-mcl

Hey, we found some performance issues regarding large data sets.

Here is an example with 100k datapoints. When we use the plotly-2.2.0.min.js, the whole plot freezes and has a very bad performance. When we use the plotly-1.58.4.min.js, everything works fine.

LayTec-AG/Plotly.Blazor#99

Activity

  1. changed the title [-]Performance Issues with large data sets[/-] [+]Performance Issues with large data sets since 2.x.x[/+] on Jun 30, 2021
  2. archmoj commented on Jun 30, 2021

    @archmoj
    Contributor

    Please note that the default hovermode in v1 is x and in v2 is closest.
    So with v2 you could simply set layout.hovermode to 'x' for this graph.

  3. nicolaskruchten commented on Jun 30, 2021

    @nicolaskruchten
    Contributor

    Let's investigate this one a bit more... 100k points shouldn't slow down this much in any hovermode, right?

  4. nicolaskruchten commented on Jun 30, 2021

    @nicolaskruchten
    Contributor

    The plots here are much faster and have hovermode=closest (and are rendered with 2.2.0) https://plotly.com/python/webgl-vs-svg/ ... what's the difference? Is closest hovermode much more efficient with a gaussian distribution of points in x/y or something?

  5. sean-mcl commented on Jul 1, 2021

    @sean-mcl
    Author

    Just tested it with sin data here. The performance impact is huge! When I use linear data, its almost unusable.

  6. ordinaryorange commented on Mar 15, 2022

    @ordinaryorange

    I can confirm it is definitely a hovermode problem.
    I was generating a WebGL scatter of circa 300,000 points where there was small Y variability over X, and the perf was awful
    If I generate a synthetic scatter with a larger distribution over Y the perf improves. Changing it to a full continuous Y distribution the perf is just fine.
    Coming back to my original scatter, if I set HoverMode=false, no perf issues
    HoverMode.x or HoverMode=xUnified = not too bad
    Hovermode.y, HoverMode.yUnified or Hovermode.Closest = awful perf
    So as @nicolaskruchten indicates it is related to the distribution of data for a given axis.
    Anything over about 50,000 points starts to lag if there is no distribution of data
    Running v2.6.3 here

  7. JudeShamsi commented on Aug 21, 2022

    @JudeShamsi

    Has anyone found any solutions to handling the issue? Setting the hovermode to 'x' has improved the hover performance slightly, however as soon as I hover over an area on the screen with many zeros, my app crashes. I'm using react-plotly 2.5.1. This only occurs once I plot more than 100k points. I'm already using scattergl as well.

  8. hobob0t commented on Mar 20, 2023

    @hobob0t

    +1 I went back to matplotlib because I need to be able to look at large data sets. Currently attempting a dataframe with 105,983 rows, and anything over 4 columns is just awful.

    As others have stated, forcing webgl doesn't help (I think it's default for plotly express anyway). Turning hovermode off works pretty well but drawing the canvas is still a chore. Plus, hovermode is half the reason I use plotly.

    If this is truly unfixable due to JS limitations, then I think plotly should feature an automatic subsampling option to reduce the number of points shown.

  9. self-assigned this
    on Jul 5, 2024
  10. removed their assignment
    on Aug 2, 2024
  11. iDevGeek commented on Jun 5, 2025

    @iDevGeek

    Still issue in Plotly 3.x.x... I would be very happy if I could downsample based on the zoom level (using React - Plotly) but that feature is lacking.

  12. saravpatel commented on Jun 10, 2025

    @saravpatel

    I also face the same issue, rendering 100k+ points in Plotly 3.x.x. I even tried mode: "lines+markers", type: "scattergl", hovermode: "x" || "y" || "x unified", but it's laggy and nothing works for me.

  13. sarintom commented on Nov 20, 2025

    @sarintom

    Same here. Currently latest version that doesn't have this issue is 1.58.5 and starting from 2.x.x it freezes the browser.

  14. siiruli commented on Nov 20, 2025

    @siiruli

    My comment in #5927 (comment) explains the probable cause of the problem. Setting spikedistance: 0 should help until the problem is fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3backlogbugsomething brokenperformancesomething is slow

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions