This article provides insights into the factors that can affect the performance of your apps and offers practical advice on how to effectively manage and reduce complexity in them.
This article covers the following topics:
What impacts the complexity of my app?
The following are common scenarios that can impact the complexity of your application and have the potential to impact performance.
What makes an app complex?
-
Number of rules and how complex they are
-
Number of equations and how complex they are
-
Number of formulas
-
Number of records/images loading on pages
-
Number of views loading on pages
Tip: For additional information about this topic, see our article here that provides a overview of the adjustments that can be made to your Knack apps in order to enhance and effectively manage their performance.
Cascading Operations
Cascading operations happen when rules, equations, and formulas are used in succession. This means a single action in your app can trigger a wave of other processes throughout your app adding to the complexity.
For example, one record update can trigger a formula update, which triggers further formula updates, etc.
Rules and Performance
What types of rules affect performance?
-
Record rules, conditional rules, and validation rules
-
These rules require records to be processed after updates are made to records.
-
-
-
These rule types affect page load speed. However, they have a less widespread impact on app performance.
-
How many rules are too many?
To keep Knack open-ended and flexible, we don’t enforce a limit on the number of rules you can add. However, each rule can vary in complexity, and it is up to you to choose what is reasonable for your app and expectations.
The more rules you add within your app, if those also involve cascading operations, the greater the impact those rules will have on the performance of the app, views, or pages. Since each app has its own setup and workflows, it is hard to provide a number of rules that will keep your app performing at the same level.
However, in general, the more operations rules trigger on other fields or connected tables, the more time it will take to process those operations thus impacting the performance of your app.
Note: Avoid depending solely on record rules in a form. Instead, enhance the speed of your form by leveraging text formulas, equations, and conditional rules to distribute these updates.
Equations, Formulas, & Performance
Why do equations & formulas affect performance?
Each time a record is touched by an action (such as, updating a record) this will create a job to process any changes in equations or formulas.
For example, if a form updates a batch of connected records, each with 20 equations, a job will be created for each of those equations which have to be processed for all of the records in that batch.
How many equations and formulas are too many?
Similar to rules, to keep Knack open-ended and flexible, we don’t enforce a limit on the number of equations and formulas you can add. However, each equation and formula can vary in complexity, and it is up to you to choose what is reasonable for your app and expectations.
A few things to consider about equations and formulas:
-
-
What are cascading operations? Cascading operations is when a record update triggers a formula update, which triggers another update, etc.
-
It is the primary reason a large number of equations and formulas can contribute to your app’s complexity.
-
-
Consider combining equations or text formulas whenever possible. Instead of using multiple equations, try to consolidate them into a single equation.
-
Remove unnecessary equations and formulas: Ensure that unnecessary equations and formulas are removed if they are no longer used.
Learn more about equations, formulas, and text formulas:
Views, Pages, & Performance
Number of Views on a Page
The number of views and the level of complexity of those views can impact page performance in the Live App. In short, the more views on a page the more your browser has to load.
For example:
-
A page with 5-10 simple views with little filtering is reasonable.
-
A page with 5-10 complex reports can make the page load slower.
-
A page with 20 views? Yikes, this will contribute to poor user experience and performance issues.
Records and Images in Views
The number of records or images displayed in views can impact page performance in the Live App. The more records or images being displayed on a page, the more your browser has to load.
For example:
-
A view with 10 records and 10 images, that's easy to load.
-
A view with 1000 records and 1000 images, that's a lot of data!
Tip: Adjust the default pagination settings to display a lower number of records when the page loads.
What happens if I notice performance issues with my app?
When you suspect that the complexity of your app may be impacting your app’s performance, the first step is to understand what is leading to that complexity.
Evaluating your app in light of the scenarios described above is a great first step. For example, if you have a form that takes too long to submit, try to think of any connected equations it may need to update before it can be completed.
Our support team can also help here if you can provide processes in your app that consistently show poor performance. We have internal tools that can help shed light on the overall complexity of your app and highlight possible areas of mitigation.
With this, we would hope to point you in the right direction as you work to reduce the complexity of your app.
Once that complexity has been confirmed, there are three basic options to consider.
-
You can try to reduce the complexity of your application.
-
You may need to consider paying for additional resources to meet your performance goals.
-
You can split your single complex app into multiple different apps. However, it is important to note that apps cannot be connected and share records or users.
Tip: To learn about how you can reduce the complexity of your app(s), see our article here.