Our Speed/Performance section in our Help Center is organized into a section for Diagnosing speed issues and a section on How to Speed Up Displayr. This article will help you work through those sections based on the performance issues you are experiencing in your document to help you identify places for improvement more easily. For the future, it's also useful to keep in mind Tips for Working Efficiently in Displayr.
1. Gather the details about the issue
More details about what is slow with a document can help you pinpoint the issue faster.
- Does it take a long time to load the document?
- Is the document noticeably slower in Edit vs View mode?
- Is there a specific output (table, visualization, Calculation, etc.) that is slow to calculate?
- Is there a particular page or set of pages that load slowly?
- Is it slow to click between pages?
- Does the slowness occur when filtering outputs or pages?
- How long would you expect or like the issue to take?
- Is this slowness experienced by only you or everyone?
- Review your Document's Memory Usage and note which categories of items or specific items use lots of memory. They will have larger boxes in the memory profiler.
2. Find what is causing the issue
There are no hard and fast rules for what causes slowness, and many times there can be multiple things at play in a document. Use the steps below based on your answers to the previous section (Gather the Details) to guide you to what areas you should look into first when assessing your document for improvement. If the document doesn't improve based on the steps below, then go to step 3 to try other improvements.
- If only you or select people are experiencing slowness, but not everyone who uses the document, see Diagnose Computer and Browser Issues.
- If the Document is slow to load in Edit mode, it may be due to the complexity or size of your data set. View the Time Taken to Load a Data Set and Review your Document's Memory Usage to see how long it takes to load your data when opening a document/dashboard and how big your data file is. You can quickly test to see if a (leaner) .sav or .QDat version of your data file both saved from Displayr improves performance, see Create a Separate Data Preparation Document.
- The document is generally slow to do everything
- Review your Document's Memory Usage to try to identify what total memory is required to run the document (around 5 GB is where you start noticing a little slowness) and if there are any types of outputs or individual outputs that may play a bigger part in that load.
- Diagnose Computer and Browser Issues
- In Edit mode, look at Understand Why a Document is Busy to see if there is any particular process that is running often and taking a long time to run.
- Review your document at a high level for easy wins to reduce memory, Reviewing your Document's Memory Usage may help clue you in on specific items or groups of items to look at first. For example:
- Lots of unneeded outputs or variables that can be deleted or consolidated, see Reduce the Number of "Things" and the Size of the "Things" in a Document.
- Reduce the Number of Calculations in a Document has a list of some not-obvious ways to reduce the number of Calculations (R-based outputs) in your document.
- Create New Variables by Duplicating and Modifying Original Variables
- Use Displayr's Native Tables
- Pages are slow when you first click on them in View or Edit mode:
- Hidden objects used as inputs to other outputs on the page can be moved to a separate hidden page so they do not all have to be rendered in the browser (even if they are subsequently hidden) when the page is loaded, see Reduce the Number of "Things" on a Page for the most efficient way to move these.
- Many similar visualizations on the same page can be combined into a small multiple visualization, Use Small Multiples Instead of Lots of Small Visualizations.
- Lots of number outputs on the same page that can be combined into an Autofit table output, see How to Create an Autofit Table and for more customization How to Customize Fonts in a CreateCustomTable R Table.
- Many outputs on the page are Calculations that can instead be created using Displayr's In-Built Features.
- Outputs are slow to run or update:
- Super large tables (over 15x15) that can be restructured to be smaller to show only the data needed, see Reduce the Size of Variable Sets Used to Create Tables. Or if they don't need to be regularly updated, you can Store the Results of Computationally-Expensive Tables as Calculations.
- See Optimize the Dependency Graph on specific items to improve how fast an output calculates.
- If an individual R-based output is slow, you can also Examine the Calculation Timings in the Raw R Output to see where the bottlenecks are with processing the final R code.
- Consider Pre-Computing Results for large outputs that don't need to be updated.
- Filtering is slow:
- Combine filter variables if possible. If filtering via page controls (Combo Box or List Box filters), combine individual filters into one combined filter variable, see How to Combine Multiple R Filter Control Variables into a Single Variable.
- Calculation time will also increase the more filter variables are applied to an output. Create new variables that are focused down to specific respondents and use those in outputs, rather than applying as many filters. For example, if you're filtering to a specific date range, create new Date variables with a specific duration (like "most recent month", "last two quarters", etc) to use as an input instead of applying filters to filter down full date variables.
3. Figure out a workaround or a solution
If the steps above don't lead to an obvious solution or provide significant performance improvement, use the below to look for some less obvious improvements. You can also browse all of the ways on How to Speed Up Displayr organized in our help center. Articles are generally organized in each section from easiest/most impactful to more involved.
- Use Visualizations and Tables That Aren't Also Calculations our legacy "with tests" visualizations (though not as robust as R-based visualizations) are calculated faster than their R-based counterparts. We are working on improving the speed of R-based visualizations in the future to make them comparable to the legacy versions.
- If you have a lot of looped data and constructed variables to "unloop" the data, you should instead follow the steps here Stack Looped Data to stack your data, then load in the separate stacked data set for those variable sets.
- To help consolidate Calculations and Visualizations, you might add Calculations into the R Code of Visualizations.
- If using a lot of Calculations to manipulate data, try to Minimize the Size and Distance of Data Being Moved, Pre-Compute Results (which can also be stored on the Displayr Cloud drive), and review your R code for efficiencies.
- If a particular action is slow, Use the Render Profiler to Understand How Long Things Take To Calculate to see where bottlenecks occur.
- See if you can Reduce any recalculations in the document.
4. Contact Support
If you've worked through these steps and are still experiencing performance issues, Get Us to Help You Make a Document Faster! When you contact our support team, please let us know what you've already tried so we can get up to speed quickly.