v0.10.0 - HTML streaming and performance boost #98
volfpeter
announced in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
What's Changed
The main feature is that the library now has a
StreamingRendererthat lets you optimize TTFB (time to first byte), basically producing instant responses.Tags (and the entire
htmlmodule) have been rewritten to improve performance. Tag creation is now ~35% faster.Rewritten how
ErrorBoundaryworks, which simplified renderers and improved performance by about ~5-10.Streaming support will soon land in FastHX and holm as well, to give you the best possible web development experience.
Features
from htmy import StreamingRenderer. (by @volfpeter in Feat: tag performance improvement, streaming renderer, baseline renderer performance improvement, uv migration #94)RendererContextutility. (by @volfpeter in Feat: tag performance improvement, streaming renderer, baseline renderer performance improvement, uv migration #94)ErrorBoundaryrendering logic into the component itself. Also slightly improved renderer performance in the process. (by @volfpeter in Feat: tag performance improvement, streaming renderer, baseline renderer performance improvement, uv migration #94)Breaking changes
These are likely to affect you:
htmltags can no longer be used for type hints. You should useComponentTypeinstead.htmltags no longer have class utilities likelink.css()ormeta.charset()for example. The title-case variants have these utility constructors instead, e.g.Link.css()orMeta.charset().WildcardTagis replace bywildcard_tag.These likely won't affect you:
tag.py.TagConfigDictwas removed, configuration is now done directly through theTag()constructor.Other changes
poetrytouv.asyncioandAwaitableinstead of the correspondinginspectfunctions).mkdocs-materialtozensicalFull Changelog: v0.9.0...v0.10.0
This discussion was created from the release v0.10.0 - HTML streaming and performance boost.
Beta Was this translation helpful? Give feedback.
All reactions