If you spot the **Calculating...** indicator hanging out in the top-right corner of your doc, this article is your go-to resource for boosting calculation speed.

Formulas in Coda are like supercharged helpers that can tackle complex calculations for you. However, sometimes these calculations might put the brakes on your doc performance or work overtime processing more data than needed. No worries though! Coda has been busy optimizing performance, and there are some easy tweaks you can make to keep your doc running smoothly.

❓ If you are unsure about the cause of a performance issues in your doc, please take a look at this overview article on improving doc performance.

**Within this article, you’ll find...**

**A few important things to keep in mind**

Before you dive into diagnosing and improving calculation performance, here is some important info to keep in mind:

**Real time updates are calculated on your device**. When you make changes in your doc, Coda works its magic and calculates those changes right on your device to show you real-time updates. To keep Coda sailing smoothly, try not to have any heavy-duty tasks running in the background, and try to avoid having the same doc open in multiple tabs in your browser.**Take a strategic and iterative approach.**If you have a big doc that is slow, it could be just one or a few formulas causing most of the trouble. Instead of diving into*every single formula*, give the**Calculation****Performance Analyzer**a spin to pinpoint the main culprits. Once you’ve identified the slowpokes, you can make some tweaks and test out your improvements!**Most formulas won't run into this.**Most Coda users craft formulas that zip through calculations without a hitch. But for those extra demanding tasks, you might encounter some speed bumps. No worries, though! We encourage you to dive in, start building, and troubleshoot as you go.

**Identify source of calculation issues**

We’ve built a nifty tool to give you a peek behind the scenes of what’s cooking in your doc: the **Calculation Performance Analyzer**. With this tool, you can measure how long certain interactions take, and pinpoint where the hold-up is happening.

Keep in mind that this tool focuses on calculation issues. If your doc is dragging but you’re not seeing that **Calculating... **indicator at the top for more than a couple seconds, check out our other performance improvement article.

**Open the Calc Performance Analyzer**

If your doc is currently calculating, you can bring up the tool by clicking the **Calculating...** indicator to jump into the tool.

You can also open the tool by opening the Doc map, then clicking the 3 dots on the top right and then clicking **Debug calculations**.

To navigate to the **Doc map**:

Click on the settings gear icon at the top-right corner of your doc

Click on

**Doc map**Click on the three-dots menu next to the

**X**to closeSelect

**Debug calculations**

**If your doc is currently calculating**

Click the **Start Measuring** button to start analyzing calculations. Sometimes, a big doc can drag its feet because of other users stirring up calculations or data syncing in the background. This tool keeps tabs on all these calculations, not just the ones you kickstart.

💡 *Tip: Thinking of setting aside some time to sleuth out all the issues? Consider making a copy of your doc for a diagnosis session.*

Once your doc finishes calculating, the tool unveils a neat list sorted by how long each formula took. Check out the suggestions in the next section of this article to give those formulas a little tune-up before diving into anything else.

**If your doc is NOT currently calculating**

If you know your doc is having calculation issues but you don’t currently see **Calculating...** showing in the upper right corner of your doc, follow the steps below. This will help you figure out what is causing the calculation issue.

Make sure the doc is not calculating.

Open the Performance Analyzer (see instructions above) and click

**Start Measuring.**Perform whatever action seems to be slowing down your doc (clicking a button, adding a row to a table, etc.)

*just once*, and wait for it to finish. Remember, the results will be incomplete until your doc finishes calculating.

Once your doc finishes calculating, you will see a list of formulas that ran during that time and how long each formula took to complete. At the top of the list should be your slowest formula(s), and therefore the likely culprit for the calculation issues. Check out the suggestions in the next section of this article to give those formulas a little tune-up before diving into anything else.

**Address calculation issues**

Once your doc wraps up its calculations, the tool reveals a sorted list showcasing how long each table took to do its thing. Here’s your game plan:

Expand the table name to pinpoint columns with slower formulas.

Click the table name to jump right to it and check out the sluggish formula.

Ready to declutter? Bid farewell to unnecessary columns or formulas and delete them entirely.

If you want to keep the formula but not have it actively calculate, you can comment it out. To do so, open your formula builder and simply add two forward slashes - // - to the front of your formula.

If you still need the formula, look through the guidelines below to optimize it!

Still need a hand? Don’t hesitate to reach out to our support team with a formula screenshot. We’re happy to help tackle it together! 🤝 🚀

**General formula optimization tips**

**Write smaller formulas:**Embrace more,*smaller*formulas in your doc over a fewer, giant formulas. If your formula is performing some complex set of calculations, consider breaking it into smaller formulas across several columns. This way, Coda can optimize as many of those calculations as possible. Plus, if you’re going to be using the same calculation in multiple larger formulas, you can put this calculation into a column, and then reuse results (instead of having Coda recalculate them each time).**Address broken formulas:**Broken formulas can slow down your doc, as Coda tries to mend errors when certain properties of your doc change. When you spot a formula with an error, consider either fixing the error, commenting out the formula (add // to the start of your formula), or removing it altogether.**Choose the right column formats for your data type:**Selecting the right column type can work wonders for calculation speed. When it comes to choosing a column type for your formula columns, here’s what works best:Opt for a column type that matches the data you’ll be adding to the column

Go format-free with the

**Text**column type.

Coda allows you to put data in a column even if it doesn't align with the column format. However, issues pop up when the chosen column format doesn’t match up with the data in the column. This makes Coda more cautious during calculations, missing out on the optimization perks tied to column types.

When your data and column types are in sync, Coda can work its magic by making smart assumptions during calculations and optimizing as needed.

**Reduce number of views:**In some docs, when the number of views skyrockets, filters and conditional formatting across all those views can drag on calculations—even if no single column is the culprit. It's not a common issue, but it can crop up as docs rack up views or hefty aggregates. If your doc falls into this category, consider using a single view with a filter bar instead of creating a sea of views for each value.**Reduce the Pack refresh rate:**In docs that have Packs, fetching the latest data from some packs can prevent other calculations from completing. You might want to consider reducing the refresh frequency or switching to manual updates instead of an hourly or daily sync schedule.**Be mindful of the Now() formula:**If you are using the Now() formula, consider which precision parameter you're using. For example Now("hour") will recalculate once an hour, while Now("second") will recalculate a whopping 3600 times an hour. Choosing the right Now() precision can amp up your doc’s performance. And for a quick optimization fix, switching to the Today() formula might just do the trick if it fits your needs.**Make valid comparisons:**If you are comparing two values, like inside a Filter() formula, make sure that they are of the same data type. For example if you are comparing an entire column of values to a single value, or if you’re comparing a date column with a text column, you’ll likely run into issues. Within the formula builder, you can click on the data inputs of your formula to see exactly what type of data each is.**Short circuit:**If you have an OR and AND in your formula, it’s better to have the AND earlier - before the OR. That way, if the conditions are false, there’s no need for us to to evaluate the rest.**Invert your filter formulas:**Try