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

feat: Speed Up Enthistory Codegen With Concurrency #49

Merged
merged 4 commits into from
Apr 18, 2024

Conversation

frisbm
Copy link
Collaborator

@frisbm frisbm commented Apr 18, 2024

Description

Small bit of optimization on codegen speed, turns out the slowest part of the enthistory codegen is actually the imports correction in the print func. A very recent issue was opened in the go repo explaining this exact issue with the imports formatting - especially in regard to ent.

golang/go#66802

Motivation and Context

enthistory & ent codegen seemed to slow down after the rewrite

How Has This Been Tested?

Done some general testing, seeing anywhere from 10%-30% improvements depending on the size of the project
Otherwise this is a non functional changeset with no outcomes on downstream users

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation (update or addition to documentation for this project)

Checklist:

  • My code follows the code style of this project.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@frisbm frisbm merged commit 0a1f272 into main Apr 18, 2024
7 checks passed
@frisbm frisbm deleted the fix/speed-up-codegen branch April 18, 2024 17:06
@philip-peterson
Copy link

@frisbm Great to hear there are more people with interest in the upstream cause. If you'd like to join forces it would be great. :) I do have a PR to implement a fix but it's blocked on a few things, could use a little support if you have extra time.

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

Successfully merging this pull request may close these issues.

None yet

3 participants