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

Improve seeding perf #9291

Open
FelixMalfait opened this issue Dec 31, 2024 · 3 comments
Open

Improve seeding perf #9291

FelixMalfait opened this issue Dec 31, 2024 · 3 comments
Assignees

Comments

@FelixMalfait
Copy link
Member

Maybe I'm missing something but does it make sense to recompute the metadata every time here? Seems like we are potentially wasting time?

Image
@FelixMalfait
Copy link
Member Author

@Weiko maybe you would know?

FelixMalfait added a commit that referenced this issue Jan 1, 2025
The DX is not great when you need to do a lot of database
resets/command.

Should we disable Typescript validation to speed things up? With this
and caching database:reset takes 1min instead of 2 on my machine.


See also: typeorm/typeorm#4136

And #9291 / #9293

---------

Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
@Weiko
Copy link
Member

Weiko commented Jan 2, 2025

@FelixMalfait this is because the new Seeder service is using ObjectMetadataService/FieldMetadataService, probably for simplicity. Those services are the ones used for the API so a "create" will trigger many things behind the scene including reset of the cache at the end. If we want to keep using it we could eventually improve those services and allow batch creation for fields and objects, that would avoid too many resets

@FelixMalfait
Copy link
Member Author

Ok thanks @Weiko yes I think it's worth keeping this open. We do this reset so often, we can save a lot of machine/human time when optimizing it :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: 🆕 New
Development

No branches or pull requests

3 participants