You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
templ generate is pretty fast. It can generate code for 32 templates in 500ms or so.
Would it be even faster if it only parsed and generated files that have changed instead of doing them all? Or would the effort of maintaining the hash or last updated date of each templ file actually reduce the performance overall?
benchmarks/templ/template.templ complete in 1.027709ms
cmd/templ/lspcmd/httpdebug/list.templ complete in 1.050959ms
cmd/templ/visualize/sourcemapvisualisation.templ complete in 1.000875ms
examples/blog/posts.templ complete in 1.015458ms
examples/hello-world-ssr/hello.templ complete in 253.209µs
# snip...
generator/test-text/template.templ complete in 426.833µs
generator/test-templ-element/template.templ complete in 493.25µs
generator/test-void/template.templ complete in 249.834µs
generator/test-text-whitespace/template.templ complete in 996.5µs
storybook/_example/templates.templ complete in 410.458µs
turbo/stream.templ complete in 399.75µs
Generated code for 32 templates with 0 errors in 470.553625ms
The text was updated successfully, but these errors were encountered:
Although there would be a small overhead in maintaining the hash list, it's likely faster overall to skip generating files that haven't changed by recalculating the hash.
templ generate
is pretty fast. It can generate code for 32 templates in 500ms or so.Would it be even faster if it only parsed and generated files that have changed instead of doing them all? Or would the effort of maintaining the hash or last updated date of each templ file actually reduce the performance overall?
The text was updated successfully, but these errors were encountered: