Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
TypeORM slow down startup time of ionic app #31
Comments
|
@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... |
|
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) |
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.