Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Don't parse templates in a render function #8

Closed
Shadowfaxenator opened this issue Oct 4, 2024 · 1 comment
Closed

Don't parse templates in a render function #8

Shadowfaxenator opened this issue Oct 4, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@Shadowfaxenator
Copy link

You parse go templates on each render, this is inefficient. You should parse on init

@petaki petaki added the enhancement New feature or request label Oct 4, 2024
@petaki
Copy link
Owner

petaki commented Oct 11, 2024

@Shadowfaxenator Thanks for the idea! In my own applications I use embedded template files so I haven't experienced any significant performance loss. However, I have improved the template handling. I cache the parsed template on the first Render call (lazy load).

@petaki petaki closed this as completed Oct 11, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants