HomeManaging Models
Troubleshooting slow or large models
Speed of model loading/calculation in Causal depends on various factors:
- Model size (cell count mainly depends on number of time steps, number of category items, number of variables, number of scenarios)
- Complexity of the formulas (e.g. a sumif formula is slower than a simple addition)
- Complexity of the visuals (charts/tables)
Investigate with Inspector
To investigate model size (and which linked models, and variables within models, are the biggest culprits), you can hit 'i' on your keyboard when you're in a model (with no variables selected) which will bring up the Model Inspector.
Storage Limit
If you see the below error message then you have breached the storage limit allowed for the model. Please follow the steps above to go to the model inspector and pay particular attention to the Variable Size Analysis section. This will show the largest variables in the model so you know which variables to target in reducing size.
Other Suggestions
If you’re having trouble with the speed / performance of your model, consider the following options:
- Turn on manual recompute. This will mean you can make multiple edits to the model, and then hit Recompute to evaluate them all at once. Hit the ⚙️ top right of the spreadsheet, and toggle Recompute manually on under Calculation.
- Hide the visuals pane (top-right of spreadsheet), and/or consider deleting unused visuals, or moving them to a separate model.
- Consider reducing the model granularity and/or the length of your model, in the time settings.
- If you’re using categories (including cohorts):
- Consider if you need the category on every variable in your model/s, or just some variables. You can aggregate away the category for the variables you don’t require the breakdown on.
- Consider if you can reduce the number of category items in the category (e.g. grouping all smaller category items into "other" instead of having them each as separate items).
- If you have variables that have a specific value/formula for each category item (or multiple overrides within the variable), this will make the model larger as Causal needs to store more. Consider if you need this, or could use one aggregate formula instead, or use a category item in an if statement (allowing you to dynamically define a variable's categorical values/formulas without requiring a separate formula for each category item).
- With if statements, consider if you really need a nested if statement (i.e. if X then Y else if A then B else [...]), or if you can use multiple if statements in the same formula (i.e. if X then Y else 0 + if A then B else 0 + [...]). The latter is a lot simpler and quicker to compute as the if statements are separate.
- If you have one big model, consider splitting it up into smaller sub-models. Note that you can use our move variable functionality to make these changes easily.
- Consider removing scenarios that are no longer in use.
- If your model is connected to a data source, and the data source is large (either because of its granularity, its dimensionality/categories etc), then consider aggregating data in the data source instead of in Causal.
- Consider upgrading to a paying plan. Paying customers’ models run on dedicated infrastructure — the model will be cached in memory which makes recomputes faster + we only send the numbers you're looking at to the browser which makes large models more manageable.