Skip to content

Optimize display of data #33

Open
Open

Description

@txtsd

After increasing the upload limit here in #32 and uploading a 19MB log, the page that displays it causes the browser to use 100% CPU and slows it to a crawl.
See: https://flightlessmango.com/games/14903/logs/1119

We need some optimization in the way data is displayed.

Activity

  1. flightlessmango commented on Nov 16, 2020

    @flightlessmango
    Owner

    I don't think it's reasonably possible to have this much data on an interactive graph.
    A few options off the top of my head

    • reduce the amount of data (you could do this yourself by setting a higher log_interval)
    • we don't have an interactive graph anymore, we generate a static image instead
    • we limit the permitted size of log files
  2. txtsd commented on Nov 16, 2020

    @txtsd
    Author
    * reduce the amount of data (you could do this yourself by setting a higher `log_interval`)
    

    This is an okay solution for those who know about what they're doing.

    * we don't have an interactive graph anymore, we generate a static image instead
    

    We could have a toggle on the page between interactive graphs and static images. The default would be interactive for a reasonably sized log. Anything above that value should default to static images. Mousing over the toggle will display a CPU usage and responsiveness warning.

    * we limit the permitted size of log files
    

    If we resort to the above solution, we don't have to limit the upload size.

  3. flightlessmango commented on Nov 16, 2020

    @flightlessmango
    Owner

    I think static image (and also having option for interactive) is the way, but I'm not sure how to make the static images automatically

  4. txtsd commented on Nov 17, 2020

    @txtsd
    Author

    Unfortunately, I'm not familiar with ruby on rails. I could've helped if the backend was in python.

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

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions