Skip to main content

Performance Optimization

Detect bottlenecks, use built-in tools like Variable Metrics, and follow best practices to keep your Farseer model fast and responsive.

Updated today

Overview

Performance optimization is critical before deploying any Farseer model to production. It's not enough to test with a single user — each model needs to be tested with the expected volume of data and concurrent user load in a realistic environment.

Detecting Performance Bottlenecks

Before testing in a real environment, use Farseer's built-in optimization tools. Then conduct real-world testing:

Concurrent User Testing

Mobilize internal and client resources in stages:

  1. Stage 1: 10 concurrent users

  2. Stage 2: 20 concurrent users

  3. Stage 3: Expected production user count

Focus on common scenarios — data entry and data retrieval in sheets and dashboards.

Common Performance Problem Classes

Observations typically fall into these categories:

  1. Application opens slowly

  2. Data retrieval in sheets/dashboards is slow

  3. Data entry in cells is slow

  4. Initial model loading is slow

Each class can have entirely different causes and solutions — from poor model design, excessive data volumes, to overly ambitious interface design.

Built-in Performance Tools

Variable Metrics

Farseer provides a quick analysis tool showing each variable's calculation time and memory cell count. Access it from the Metrics view in the top-right corner of the Variables module.

The key ratio to watch: Cell Count / Duration. A disproportionately high duration compared to cell count is a strong indicator of a problem — such as unwanted dimension fanouts or inefficient formulas.

Note: The model must be fully evaluated before Variable Metrics can display data.

Evaluation Logs

If Variable Metrics can't be accessed (e.g., the evaluator failed), use the direct evaluation log. It shows memory overflows and other issues that cause the evaluator to stop the calculation.

Variable Execution Order

Track the sequence of variable execution by expanding the "Used in X formulas" section in a variable's edit dialog. Following this chain helps you detect dimension mismatches and unwanted fanouts.

Addressing Each Problem Class

1. Application Opens Slowly

  • Is it constantly slow or only periodically?

  • If periodic, is it related to time of day or number of active users?

  • Contact Farseer technical support with your findings.

2. Slow Data Retrieval

  • Is it slow for one user or multiple concurrent users?

  • Complex sheets directly affect server stress — consider simplifying the user experience by breaking complex views into smaller, focused sheets.

3. Slow Data Entry

Several possible causes:

  • Variable has too large dimensionality — consider breaking it into smaller variables

  • Entry triggers cascading calculations — analyze the variable tree for unwanted fanouts. Top-down entries at high aggregation levels can trigger changes to hundreds of thousands of cells. Consider:

    • Activating Constrained Top-Down to restrict high-level entries

    • Using Template Formulas for structured data entry

    • Breaking the calculation chain with Calculate on Demand variables

    • Setting certain hierarchy levels to Read Only

4. Slow Initial Model Loading

  • Check for dimension fanouts using Variable Metrics

  • Avoid unnecessary calculations on Actual data — import pre-calculated values instead

  • Ensure calculations on imported Actual data use Calculate on Demand variables

Best Practices for Performance

  1. Modularize your model. Break it into smaller modules that aggregate and reduce dimensionality toward final output variables.

  2. Use Read Only aggressively. Set calculation variables to Read Only to prevent accidental entries that trigger unwanted recalculations.

  3. Minimize input vectors. Avoid allowing data entry on variables with complex formulas.

  4. Watch for dimension fanouts. Unwanted fanouts in variable formulas are the #1 suspect for poor performance.

  5. Simplify user interfaces:

    • Avoid entries at high aggregation levels that trigger cascading calculations

    • Minimize filter usage on large-dimensionality sheets

    • Avoid mixing reporting columns with input masks on high-dimensionality sheets — use reporting elements in rows instead

  6. Import pre-calculated actuals. Don't perform unnecessary calculations within Farseer when the data can be calculated externally.

  7. Use measures for reports. For displaying reports in different currencies or calculating various indices, measures execute on demand and don't participate in initial calculations.

  8. Don't replicate Excel blindly. Always analyze dimensions and required variables before migrating an Excel model into Farseer.

Did this answer your question?