Skip to content

API Generator: Improve performance by not formatting generated files with ESLint anymore #3789

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

Merged
merged 8 commits into from
May 13, 2025

Conversation

nsams
Copy link
Member

@nsams nsams commented Apr 14, 2025

This switches eslint to TypeScript Compiler Api printer, which is very limited but very fast

Runtime in my machine is now 10s for demo

When scaffolding run eslint as first step.

@nsams nsams requested a review from johnnyomair April 14, 2025 17:34
@nsams nsams self-assigned this Apr 14, 2025
nsams added 3 commits April 24, 2025 13:18
… eslint anymore

When scaffolding run eslint as first step.

This switches eslint to TypeScript Compiler Api printer, which is very limited but very fast
@nsams nsams force-pushed the api-generator-remove-eslint branch from ac16343 to 1ff9c58 Compare April 24, 2025 11:21
in demo this close suddenly took 1 minute (did not before). And as we don't open a connection to a real database I
don't see any need for a close, especially as the script exits anyway right after the close.
Copy link
Collaborator

@johnnyomair johnnyomair left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's your plan for the generated files? Should we remove them from Git?

@nsams
Copy link
Member Author

nsams commented Apr 24, 2025

What's your plan for the generated files? Should we remove them from Git?

yes, we could do that - the initial reason why we added them is gone.

But: we would loose the diff for the generated code, I'm really not sure what is best.

@johnnyomair
Copy link
Collaborator

But: we would loose the diff for the generated code, I'm really not sure what is best.

Should we invest some effort to fix formatting (e.g., order imports)?

@nsams
Copy link
Member Author

nsams commented Apr 29, 2025

Should we invest some effort to fix formatting (e.g., order imports)?

Imho it is fine like that. Not perfect, but good enough.

@johnnyomair johnnyomair self-requested a review May 7, 2025 15:10
@johnnyomair johnnyomair changed the title Api Generator: Improve Performance: Don't format generated files with eslint anymore API Generator: Improve performance by not formatting generated files with ESLint anymore May 8, 2025
nsams and others added 2 commits May 13, 2025 08:27
Co-authored-by: Johannes Obermair <[email protected]>
Co-authored-by: Johannes Obermair <[email protected]>
@johnnyomair johnnyomair merged commit e5b3b3d into next May 13, 2025
11 checks passed
@johnnyomair johnnyomair deleted the api-generator-remove-eslint branch May 13, 2025 08:14
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.

2 participants