Angular Performance

49 views
Skip to first unread message

Neha Yargal

unread,
Feb 3, 2021, 9:19:18 AM2/3/21
to ang...@googlegroups.com
Hi There,

I need help to improve the performance of an angular application. It is taking Long time to load initially. We have already Optimized API's. Considering to minimize Js. I will appreciate if someone helps to look at other factors to improve performance.

Thank you
Neha

Shashwat

unread,
Feb 5, 2021, 6:22:55 AM2/5/21
to Angular and AngularJS discussion
Hi Neha,

Please check the size of the dist folder and at the time of loading check the size of vendor-es2015xxx.js, 6-es2015xxxx.js files. If the file size is big use this command for build npm run env -s && ng build --prod --aot --vendor-chunk --common-chunk --delete-output-path --buildOptimizer

Regards,
Shashwat

vamshi eega

unread,
Feb 5, 2021, 7:36:25 AM2/5/21
to ang...@googlegroups.com
Hi 
As you said its taking a long time to load the file , so you can use lazy loading concept for creating components. by this when user visit your website , initially it load particular component later when user select particular item , use router for lazy loading at that time it loads another component instead of loading the file completely 

--
You received this message because you are subscribed to the Google Groups "Angular and AngularJS discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to angular+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/angular/CACCTogeZbWaYCYPZ%2BiSWO6u654MpifNHeyFwkbwQiU83rzkk6Q%40mail.gmail.com.

Sunny Vakil

unread,
Feb 5, 2021, 7:36:25 AM2/5/21
to ang...@googlegroups.com
Hi Neha,
I highly recommend that check your every component and make sure that no unnecessary import there. 
Please avoid any unnecessary third party packages, consider aot.
Make use of maximum dumb/presentational components.

Regarding the 1st point, please make this setting in your settings.json, It will remove unused import on save and organize them. 

“editor.codeActionsOnSave”: {
      “source.organizeImports”: true
}

I hope it helps.

Thanks,
Sunny

--
You received this message because you are subscribed to the Google Groups "Angular and AngularJS discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to angular+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/angular/CACCTogeZbWaYCYPZ%2BiSWO6u654MpifNHeyFwkbwQiU83rzkk6Q%40mail.gmail.com.
--
— Thanks & Regards
Sunny Vakil
Reply all
Reply to author
Forward
0 new messages