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

Optimize display of data #33

Open
txtsd opened this issue Nov 16, 2020 · 4 comments
Open

Optimize display of data #33

txtsd opened this issue Nov 16, 2020 · 4 comments

Comments

@txtsd
Copy link

txtsd commented Nov 16, 2020

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.

@flightlessmango
Copy link
Owner

flightlessmango commented Nov 16, 2020

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

@txtsd
Copy link
Author

txtsd commented Nov 16, 2020

* 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.

@flightlessmango
Copy link
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

@txtsd
Copy link
Author

txtsd commented Nov 17, 2020

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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants