Disable autoreload in production dashboard, drop dead WSGI server property#956
Merged
Conversation
…perty run_forever is the live production entry point and hardcoded autoreload=True, installing Panel's periodic file-watcher. py-spy profiling of the Bifrost production dashboard showed it consuming ~11.6% of baseline CPU on the server IOLoop with no benefit in production. Tie autoreload to the dev flag instead. The sibling `server` property was a WSGI/gunicorn entry-point hook. gunicorn and the *_wsgi.py modules were removed earlier, leaving it orphaned with no call sites. Remove it. Fixes #954 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
MridulS
approved these changes
Jun 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Dashboard.run_forever— the live production entry point — started Panel's server withautoreload=True, installing a periodic source-file watcher. py-spy profiling of the healthy Bifrost production dashboard showed this_check_filewatcher consuming small baseline CPU on the server IOLoop, with no benefit in a deployed service. Autoreload is now tied to the dev flag (autoreload=self._dev), so it is active only for local development and off in production.While here, the sibling
serverproperty is removed. It was a WSGI entry-point hook (application = _app.server) for gunicorn deployment. gunicorn and the*_wsgi.pymodules were removed previously, leaving the property orphaned with no remaining call sites in the codebase. Removing it also eliminates the near-duplicatepn.serve(...)call whose divergentautoreloadvalue was the root of this issue.Fixes #954
🤖 Generated with Claude Code