-
Notifications
You must be signed in to change notification settings - Fork 7
Slowdown explore #117
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
base: dev
Are you sure you want to change the base?
Slowdown explore #117
Conversation
|
Thanks Joey! |
|
We don't have anything like this in TOM Toolkit for a few reasons, the biggest one being we try to avoid javascript. |
|
Thanks Joey, this is super helpful! I'll pass the info along and we'll make sure to experiment carefully. @moira-andrews @dahowell |
|
Some preliminary testing from me was consistently giving this error, which is very similar to the |
|
@moira-andrews thanks for raising this; I investigated a bit before I pushed the most recent changes but wasn't able to resolve it right away. I'll keep investigating and see if we can find a solution. |
…ms with changing session ID, should fix issue local testing succeeded
|
This branch fixes the main performance problems on the target detail page: slow first load, UI freezes during data fetches, and the recurring Dash “Error loading layout” failures. The solution is a shift to progressive lazy loading. Only the Overview tab renders on the initial request, while all other tabs (and the heavy components inside Overview) load asynchronously. Tabs stay disabled until their data arrives, unclickable and grayed out. Portions of the code for this PR were written using AI assistance (Cursor/Claude Sonnet). The core behavior is driven through
On the backend, I added dedicated endpoints for each tab and each plot in The Dash “Error loading layout” bug turned out to be caused by expired Dash session keys. I added a client-side monitor that:
On the backend, a new log filter compresses the long Dash traceback into a single line containing the app name and dead session key. Testing was done in the new development environment created by @moira-andrews. She reproduced the speedups and flagged an issue I fixed by integrating the MutationObserver logic. The main code changes are in:
See a demo of the wildly improved performance below. I test opening 3 pages quickly in the production snex2 and the branch with the new changes. In the old version all 3 bug out and require reload. Even on reload performance is very slow and multiple "Error loading layout" errors occur. Both issues are solved in the new version; pages open instantaneously, and all layout load failures are quietly handled. Old snex2 is on left, new snex2 is on right. snex2_performance_demo3.mp4 |




Note from @jrfarah: this is now ready to be reviewed. See my comment below for a description of the new changes and improvements.
This is a draft PR.This lets me make comments and relate our conversation more directly to the code in a self contained way.
The draft part of it is super useful because we all know the code isn't ready for review yet, but it could be converted into a real PR ready for review at any time.