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

Remove format at end of generation #2308

Open
clayne11 opened this issue Jul 29, 2022 · 0 comments
Open

Remove format at end of generation #2308

clayne11 opened this issue Jul 29, 2022 · 0 comments

Comments

@clayne11
Copy link
Contributor

clayne11 commented Jul 29, 2022

The internal/imports.Prune method parses the entire generated file, removes unused imports, then reformats it. This can be very expensive in large files (we have some files that are 680k lines / 40MB+).

We should be able to determine the required imports as we build the file, only include the correct imports, and avoid this step entirely.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants