Skip to content

replace go objects with dicts in wind streaming example to improve perf #332

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

Merged
merged 1 commit into from
Oct 9, 2019

Conversation

michaelbabyn
Copy link
Contributor

@michaelbabyn michaelbabyn commented Oct 8, 2019

should help resolve #331.

After profiling this app with py-spy, this app running with a 5 tabs open spent 98% of the gunicorn resources updating graphs and most of that time was spent by plotly.py validating them. Getting rid of the go objects reduced the time spent updating the graphs to 33%

Before (using go objects)

Screenshot from 2019-10-08 16-36-19

After (using dicts)
Screenshot from 2019-10-08 16-36-44

Issue for app: #[issue number here]

App pull request

  • This is a new app
  • I am improving an existing app (redesigns/code "makeovers")

About

  • Playground deployment URL (new version):
  • Current gallery app URL: (delete this line if inapplicable)
  • Python app repository link: (delete this line if you are working on a Python app)

Workflow

  • I have created a branch in the appropriate monorepo, and the
    elements necessary for successful deployment are in place.
  • If the app is a redesigned and/or restyled version of an
    existing gallery app, I've summarized the changes requested in the
    appropriate Streambed issue and confirm that they have been applied.
  • If the app is on the Dash Gallery portal, I have added a link to
    the GitHub repository for the source code in the portal description.
  • If the app is a reimplementation of a Python gallery app for the
    DashR gallery, the app in this PR mimics, as closely as possible,
    the style and functionality of the existing app.=
  • I have removed all Google Analytics code from the app's
    assets/ folder.

The pre-review review

I have addressed all of the following questions:

  • Does everything in my code serve some purpose? (I have removed
    any dead and/or irrelevant code.)
  • Does everything in my code have a clear purpose? (My code is
    readable and, where it isn't, it has been commented appropriately.)]
  • Am I reinventing the wheel? (I have used appropriate packages to
    lessen the volume of code that needs to be maintained.)

Copy link
Contributor

@shammamah-zz shammamah-zz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💃 Looks good to me

@michaelbabyn
Copy link
Contributor Author

Cool. @shammamah , would you be able to merge? I don't have privileges to merge to this branch.

@shammamah-zz shammamah-zz merged commit 5e464e5 into dash-wind-streaming Oct 9, 2019
@shammamah-zz shammamah-zz deleted the speedup-wind-streaming branch October 9, 2019 14:29
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

Successfully merging this pull request may close these issues.

2 participants