What are some of the best practices to speed up Appsmith Apps?

This question was asked by one of our community members from Discord:

Been using appsmith for a while now and do appreciate it. Now, I noticed some apps are slower than others and I was wondering whether there are some “rules of the thumb” that one should follow to avoid apps slowing down (e. g. slow in loading a page/table). I know there could be a lot of reasons especially since some apps have more widgets etc. But at least the major/obvious issues one should take care of to avoid a slowdown.

This isn’t a lazy question :grinning: but rather looking for some best practices or rather obvious mistakes that one should avoid.

There are certain things you can do to speed up your app:

  1. Reduce the number of widgets on the page. As a best practice, divide the functionality of the app into multiple pages rather than overloading a single page with hundreds of widgets.

  2. Reduce the amount of data being fetched from backend datasources. This can be achieved through server-side pagination. Appsmith is geared for operational applications rather than BI use cases.

  3. Examine what JS code is running on page load. Are there any functions that take a long time to complete? Typical candidates include: long-running for-loops and filtering functions? This can be measured by visiting the page in Edit mode and running the JSObject functions individually.