mhartington / ama

Ask me anything!
5 stars 1 forks source link

What's the best way to improve performance in Ionic apps? #29

Closed antonmyrberg closed 7 years ago

antonmyrberg commented 7 years ago

Example of things I'm looking for:

For lists, use VirtualScroll to create "infinite" lists

Thanks! /Anton

mhartington commented 7 years ago

I guess first few things that come to mind is external libraries. There are many cases where people are pulling in all of lodash and all of momentJS and really the only need 2-3 methods from each. Instead, using as much of raw JS as possible helps keep the overall size of your apps bundle small. If not, use alternative libraries that have a smaller foot print.

momentJS => DateFNS Lodash => LodashES

-What should I implement

Lazy loading of pages. I got over the first bit of detail on how to set this up (http://blog.ionic.io/ionic-and-lazy-loading-pt-1/) but it really can make the first load of your app a lot faster, and a lot smoother