I have just completed my project which is a book with titles and description and the ability to search for each item.
but it take about 15 sec to load. which is too slow for me. it also shows a white screen after the splash screen.
please help. below is my package.json file. thanks
just three pages
one is the welcome page
The other is a page where the content is shown
I used ngfor to repeat items which are titles from data stored in the controller and
the last page is used to display the details as stored in the controller.
I am not sure i know much about lazy loading, however i assume this app is not that big to have this kind of experience. thanks.
This is not a production build, but a release build. For a production build you have to add --prod - which actually will make the app start a lot faster.
That’s why I asked @rafadeaderinwale several times how he builds the app - but he always ignores that question.
Sorry, yep, I should have suggested adding the --prod flag! It should cut his startup time down a significant amount. Thanks for the correction @Sujan12 !
Sorry I did not know i left that question out. However I have built with all the options i know. i have even built through the android studio. I generated the key and even signed the apk. that is the reason i am so confuse.
Post your ionic info please.
Using any additional Cordova plugins?
How long does a new app created with ionic start blank blank take on your environment to start?
Hi after trying all I could i finally decided to remove all the apps and reinstall. nodejs went smooth but ionic and cordova gave me errors. this is an extract from the log. do you have any ideas.
8163 silly extract dependency-ls@1.1.1
8164 verbose unlock done using C:\Users\HP\AppData\Roaming\npm-cache\_locks\staging-44c5448c6858e3d9.lock for C:\Users\HP\AppData\Roaming\npm\node_modules\.staging
8165 warn optional SKIPPING OPTIONAL DEPENDENCY: rx-lite@3.1.2 (node_modules\cordova\node_modules\rx-lite):
8166 warn optional SKIPPING OPTIONAL DEPENDENCY: sha1-Gc5QLKVyZl87ZHsQk5+X/RYV8QI= integrity checksum failed when using sha1: wanted sha1-Gc5QLKVyZl87ZHsQk5+X/RYV8QI= but got sha1-FGHEQ8pu6JiN6eEf7bfp05gBxLE=. (48620 bytes)
8167 warn optional SKIPPING OPTIONAL DEPENDENCY: jju@1.3.0 (node_modules\cordova\node_modules\jju):
8168 warn enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, utime 'C:\Users\HP\AppData\Roaming\npm\node_modules\.staging\jju-9f29213a\lib\document.js'
8169 verbose enoent SKIPPING OPTIONAL DEPENDENCY: This is related to npm not being able to find a file.
8169 verbose enoent SKIPPING OPTIONAL DEPENDENCY:
8170 warn optional SKIPPING OPTIONAL DEPENDENCY: buffer@4.9.1 (node_modules\cordova\node_modules\buffer):
8171 warn enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, utime 'C:\Users\HP\AppData\Roaming\npm\node_modules\.staging\buffer-1d0d205c\index.js'
8172 verbose enoent SKIPPING OPTIONAL DEPENDENCY: This is related to npm not being able to find a file.
8172 verbose enoent SKIPPING OPTIONAL DEPENDENCY:
8173 warn optional SKIPPING OPTIONAL DEPENDENCY: boom@2.10.1 (node_modules\cordova\node_modules\boom):
8174 warn enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, utime 'C:\Users\HP\AppData\Roaming\npm\node_modules\.staging\boom-d2fbfe10\README.md'
8175 verbose enoent SKIPPING OPTIONAL DEPENDENCY: This is related to npm not being able to find a file.
8175 verbose enoent SKIPPING OPTIONAL DEPENDENCY:
8176 warn optional SKIPPING OPTIONAL DEPENDENCY: json-schema@0.2.3 (node_modules\cordova\node_modules\json-schema):
8177 warn enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, utime 'C:\Users\HP\AppData\Roaming\npm\node_modules\.staging\json-schema-cccdd68f\lib\validate.js'
8178 verbose enoent SKIPPING OPTIONAL DEPENDENCY: This is related to npm not being able to find a file.
8178 verbose enoent SKIPPING OPTIONAL DEPENDENCY:
8179 warn optional SKIPPING OPTIONAL DEPENDENCY: jschardet@1.5.1 (node_modules\ionic\node_modules\jschardet):
8180 warn enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, utime 'C:\Users\HP\AppData\Roaming\npm\node_modules\.staging\jschardet-d5c2db4f\dist\jschardet.min.js'
8181 verbose enoent SKIPPING OPTIONAL DEPENDENCY: This is related to npm not being able to find a file.
8181 verbose enoent SKIPPING OPTIONAL DEPENDENCY:
8182 verbose type OperationalError
8183 verbose stack Error: sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA= integrity checksum failed when using sha1: wanted sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA= but got sha1-8KUsOameHhDxpbCm449UbpuvqBE=. (4996 bytes)
8183 verbose stack at Transform.on (C:\Program Files\nodejs\node_modules\npm\node_modules\ssri\index.js:275:19)
8183 verbose stack at emitNone (events.js:110:20)
8183 verbose stack at Transform.emit (events.js:207:7)
8183 verbose stack at endReadableNT (_stream_readable.js:1045:12)
8183 verbose stack at _combinedTickCallback (internal/process/next_tick.js:138:11)
8183 verbose stack at process._tickCallback (internal/process/next_tick.js:180:9)
8184 verbose cwd C:\Users\HP
8185 verbose Windows_NT 10.0.14393
8186 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "ionic" "cordova"
8187 verbose node v8.3.0
8188 verbose npm v5.3.0
8189 error code EINTEGRITY
8190 error sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA= integrity checksum failed when using sha1: wanted sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA= but got sha1-8KUsOameHhDxpbCm449UbpuvqBE=. (4996 bytes)
8191 verbose exit [ 1, true ]
These are corrupt downloads. Try to isolate whether it is a problem with your box or your network. Either bring this computer to a different network environment or bring a different computer into this network. Whichever the problem follows is the culprit. It could be impending disk failure, failing RAM, overheating/bad PSU, or something is interfering with your network. Either way, things are seriously wrong here. Especially combined with the long load times (if these are happening on an emulator on the build box), I lean towards suspecting some sort of hardware issue here.
I got it to work the hard way. Had to delete the NodeJS and remove all packages manually. them with a clean slate, I re Installed all the apps and used the ionic cordova run android --prod. it worked so well. now my app loads within three seconds. Thanks to you all