Skip to content
This repository has been archived by the owner on Jun 4, 2024. It is now read-only.

Avoid excessive updates #21

Merged
merged 21 commits into from
Sep 19, 2017
Merged

Avoid excessive updates #21

merged 21 commits into from
Sep 19, 2017

Conversation

chriddyp
Copy link
Member

@chriddyp
Copy link
Member Author

I have a preliminary fix available in v0.10.0-rc1. Try it out with:

pip install dash-renderer==0.10.0-rc1

@chriddyp
Copy link
Member Author

Just manually tested this on the dash-docs repo. With this patch, loading http://localhost:8000/dash/getting-started-part-2 results in 47% less requests (25 -> 17)! 🐎

@wtluke
Copy link

wtluke commented Sep 15, 2017

No luck yet for me @chriddyp. LMK if you want to see my script to help debug (or decide it's a different issue)

@chriddyp
Copy link
Member Author

LMK if you want to see my script to help debug (or decide it's a different issue)

@wtluke - Yeah, that would be helpful. Thanks!

@wtluke
Copy link

wtluke commented Sep 15, 2017

Emailed 👍

@chriddyp
Copy link
Member Author

@wtluke - It looks like the infinite looping was a separate issue that was caused by having 2 dcc.Location properties with the same ID (dcc.Location(id='url')). (One in runner.py, the other in beehive.py). Removing the duplicate dcc.Location (in beehive.py) fixed the infinite loop for me ✅

Applying this patch to your example seemed to reduce the number of times one of your callbacks was being called from 16 times to just 2 times 🚀 !

@wtluke
Copy link

wtluke commented Sep 16, 2017

Wow. Wow. Thank you, Chris. And this fix is insane - it has transformed the app into something unbelievably fast! Has caused me a lot of pain (trying to work out ways of avoiding 16 callbacks) - I never realised your solution here (calling it two times, per output) would have been possible. Wish I'd spoken up earlier. Absolutely superb - can't thank you enough.

Onwards!

@chriddyp chriddyp merged commit 270628f into master Sep 19, 2017
@chriddyp chriddyp deleted the avoid-excessive-updates branch September 19, 2017 14:58
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants