ionic-example
ionic-example copied to clipboard
TypeORM slow down startup time of ionic app
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.
@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)