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

TypeORM slow down startup time of ionic app #31

Open
thibaud-sanchez opened this issue Nov 14, 2018 · 2 comments
Open

TypeORM slow down startup time of ionic app #31

thibaud-sanchez opened this issue Nov 14, 2018 · 2 comments

Comments

@thibaud-sanchez
Copy link

thibaud-sanchez commented Nov 14, 2018

I can reproduce it on a new project, If I add TypeORM according to the Readme file to my project, my app start normally in about 4sec (prod mode).

But if somewhere in my app I use an entity created for typeORM (without creating database connection and without inserting it, just a new), like :
let user = new TestUser();

I noticed that my app take 2 seconds more to start even if my new is never called nowhere... Is it possible to do this job in background and not at startup, because I don't really need TypeORM at startup.

Do you know why does it slow down the app startup ?
I can give you a step to reproduce if you tell me it's abnormal.

@joshstrange
Copy link

@thibaud-sanchez Did you ever get this figured out? I suspect this is a large reason by app takes so long to launch. I want to use TypeORM but I'll just use key:value storage if it's going to speed up my startup significantly...

@HeikoKanzler
Copy link

I just faced the same challenge, I tried the Ionic Demo App (super simple blank app) and the launch time is about 10 seconds on my machine, just by adding TypeOrm. (only checked in the browser)

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

3 participants