Skip to content

Strip indentation of release dashboard HTML - #798

Merged
zware merged 1 commit into
python:mainfrom
hugovk:strip-indentation
Oct 1, 2026
Merged

zware merged 1 commit into
python:mainfrom
hugovk:strip-indentation

Conversation

@hugovk

@hugovk hugovk commented Sep 22, 2026

Copy link
Copy Markdown
Member

The release dashboard is big, about 12 MB of raw HTML.

The template is heavily indented, which is very good for readability.

But this results in over half the generated page being whitespace.

If we strip indentation, this gets us down to around 5.4 MB, making it around 55% smaller.

Stripping the leading indent from the generated page should reduce the page load time from around 7s to 4s.


I've also opened a PR to enable gzip compression on the nginx server (python/psf-salt#655), which should do a very good job of compressing repeated whitespace, so this PR won't have as big as an effect, maybe half a second or so.

But there's still a benefit: half the data to send from Twisted to nginx and compress, half to keep in the browser cache, and a bit less parsing in the browser.

Easy to disable for local dev/testing of the dashboard if needing to inspect actual HTML.

@hugovk hugovk changed the title Stip indentation of release dashboard HTML Strip indentation of release dashboard HTML Sep 22, 2026

@StanFromIreland StanFromIreland left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@zware zware left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I wonder about stripping the template itself (once) before passing it along to flask, but this looks good as is.

@zware
zware merged commit 1363212 into python:main Oct 1, 2026
1 check passed
@hugovk
hugovk deleted the strip-indentation branch October 1, 2026 17:26
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.

3 participants