Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Refactor incremental code generation feature with valyala/quicktemplate instead of text/template #12

Closed
wubin1989 opened this issue Jun 2, 2022 · 1 comment

Comments

@wubin1989
Copy link
Contributor

wubin1989 commented Jun 2, 2022

When appending new code to the two files handlerimpl.go and svcimpl.go, there is performance issue. I want to refactor this feature using valyala/quicktemplate instead, but I should confirm the posibility.

valyala/quicktemplate#92 (comment)

@wubin1989
Copy link
Contributor Author

Fixed. The bottleneck isn't text/template, is golang.org/x/tools. You can refer to golang/go#32750 and golang/go#36034. Incremental generation of handlerimpl.go, svcimpl.go and clientproxy.go are optimized 100x. Before 1s, now 10ms.

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

No branches or pull requests

1 participant