Skip to main content

Identify the Bottleneck

Export performance issues in Risksheet primarily stem from cell merging in hierarchical layouts. The export engine must calculate merge boundaries for every merged region in the grid, and this computation grows significantly with document size. Use this decision matrix to identify your specific bottleneck:
FactorImpactMitigation
Cell merging (hierarchical view)High — primary bottleneck for both Excel and PDFSwitch to Flat table view before exporting
Number of multiItemLink columnsHigh — each cell requires JSON array parsing and label resolutionReduce visible link columns using saved views
Total row count (500+ rows)Medium — linear scaling with row countSplit large sheets by FMEA type or component
Server-rendered columnsMedium — requires HTML-to-text conversion per cellMinimize server-rendered columns in export views
Conditional formatting / cell decoratorsLow — CSS evaluation is fastMinimal impact on export time
Column countLow — horizontal scaling is manageableUse hideColumns parameter in PDF scripts
diagram

Switch to Flat Table View for Export

The most effective optimization is switching to Flat table view before exporting. This eliminates the merge calculation overhead entirely.
  1. Open your Risksheet document
  2. Switch to the Flat table view using the view selector in the toolbar
  3. Trigger the export (Excel or PDF) — the progress toast appears: “Exporting to Excel” or “Exporting to PDF” with an animated progress indicator
  4. Wait for the export to complete and the file to download
  5. Switch back to your preferred hierarchical view after the export completes
Switching from hierarchical view to Flat table view reduced export time from approximately 3 hours to 3-7 minutes in real customer scenarios with large, heavily merged risksheets. Always use Flat table view for large document exports.
The masterMergeOnly property (labeled as flatTable in export diagnostic logs) controls whether the export uses a flat table structure or includes hierarchical merges. Both mergeCacheFlag and masterMergeOnly are logged during export for diagnostics.

Configure Performance Parameters

Enable Module-Only Permissions

Set moduleOnlyPermissions=true at the project level to speed up loading of large sheets. This parameter restricts permission checks to the document module level, avoiding per-item permission evaluation that can be very slow for documents with hundreds of work items.
Enabling moduleOnlyPermissions disables per-item permission checks. If your project relies on fine-grained per-work-item permissions, this optimization may allow users to see or edit items they should not have access to. Verify your permission requirements before enabling.

Prevent Full Page Reload on Save

Set refreshOnSave to false in your risksheet.json to avoid a full page reload after each save operation:
{
  "global": {
    "refreshOnSave": false
  }
}
This prevents the grid from reloading all data after every save, which is particularly beneficial when editing large sheets with many linked items.
Setting refreshOnSave to false improves save performance but may cause stale link rendering in some scenarios. Links created or modified during the editing session may not reflect their latest state until the page is manually refreshed. Test with your specific configuration before applying broadly.

Reduce Visible Columns Before Exporting

Use saved views to create an export-specific column visibility preset that hides columns not needed in the export output:
  1. Create a saved view with only the columns required for the export
  2. Switch to that view before triggering the export
  3. The export processes only visible columns, reducing per-row processing time
This is especially effective for sheets with many multiItemLink columns, as each requires JSON array parsing and label resolution during export.

Optimize PDF Export

PDF export has additional validation requirements and processing steps beyond Excel export.

Pre-Export Validation

PDF export validates the sheet state before proceeding:
ValidationBehavior When Failed
Unsaved changes (isDirty())Export is blocked. Save all changes first.
Comparison mode activeExport is blocked. Exit baseline comparison view before exporting.
If the export is blocked, Risksheet displays a validation message explaining which condition failed. Save your changes or exit comparison mode, then retry.

Custom PDF Export Scripts

PDF export uses Velocity templates to generate the export layout. Review your custom pdfscript.js for potential inefficiencies:
  • Use the hideColumns parameter (comma-separated binding names) to exclude unnecessary columns from the exportMainSheet call. Hidden columns are temporarily removed during export and restored afterward.
  • Consider using exportSubTable or exportDownstreamTable for focused exports of specific data subsets rather than exporting the entire grid.
  • The emptyPlaceholder property controls what text appears for null or empty cells. Set this to null (default) to skip rendering empty cells entirely.
Available export scope variables in custom scripts:
VariableDescription
exporterThe export engine instance with all export methods
isInCompareWhether comparison mode is active
compareRevisionThe revision being compared against
currentRevisionThe current document revision
showUnchangedWhether to display unchanged rows in comparison

Known PDF Export Limitations

IssueDescriptionStatus
Text truncation for linked elementsCell height calculation may truncate text for linked elements (hazard, hazardous situation, harm)Fix planned with highest priority
Text repetition on page breaksWhen a risk item spans multiple pages, partial text is repeated on the next page for contextBy design, but can confuse reviewers who interpret it as a new risk entry
Risk matrix calculation errorsRisk matrix totals in PDF may not correctly count risks across all severity categoriesUnder investigation
Table overflow for long textTables may not auto-extend for very long text contentUnder investigation
PDF export cell height calculation has a known regression that can truncate text for linked elements. This is tracked as a high-priority issue. Check for updates in Risksheet version v25.2.0 and later, which includes optimizations for merged cell processing.

Optimize Excel Export

Excel export processes each cell type individually during the formatting callback. Understanding how each column type is exported helps you identify optimization opportunities:
Column TypeExport BehaviorPerformance Notes
Plain text / stringDirect value copyFast
BooleanConverts checkbox to true/false textFast
Item linkStrips HTML markup, outputs plain textModerate — HTML parsing per cell
Multi-item linkParses JSON array of {id, label} objects, joins with newlinesSlow — JSON parsing per cell, items with IDs starting with * are prefixed
Multi-enumResolves enum IDs to display names from configuration, joins with commasModerate — lookup per value
Server-renderedStrips HTML, preserves line breaks from list itemsModerate — HTML processing
The export always includes:
  • Column headers in bold font at the top of the sheet
  • Row headers showing system item IDs in bold font
  • Cell styles (background colors, text colors) preserved from the grid when includeStyles is active

Excel Export Progress Feedback

During export, Risksheet displays a progress toast notification:
  • Title: “Exporting to Excel”
  • Message: “Please wait while the file is being generated…”
  • Behavior: The toast persists until the export completes, then automatically dismisses. A 100ms delay ensures the progress indicator renders before the export engine begins processing.

Version-Specific Improvements

VersionImprovementImpact
v24.8.5moduleOnlyPermissions=true parameterFaster loading for large sheets by reducing permission check overhead
v24.8.6Faster merger for multiItemLink columnsImproved merge calculation for sheets with many multi-item link columns
v25.2.0Optimized merged cell processing for exportsReduced export time for hierarchically merged sheets
If you are experiencing export performance issues, ensure you are running Risksheet v25.2.0 or later, which includes cumulative performance optimizations for merged cell processing, permission checks, and multi-item link handling.

Verification

After applying performance optimizations:
  1. Switch to Flat table view in the Risksheet toolbar
  2. Optionally, switch to an export-specific saved view to reduce visible columns
  3. Trigger the export and observe the progress indicator (“Exporting to Excel” or “Exporting to PDF”)
  4. Confirm the export completes within minutes, not hours
  5. Open the exported file and verify that all expected data is present
You should now see the export complete significantly faster, with the progress toast displaying briefly before the file downloads. For very large documents (500+ rows with many link columns), expect export times of 3-7 minutes in Flat table view.

See Also

Support TicketsSource Code
  • ExportToExcelCommand.ts
  • ExportToExcel.ts
  • ExportToPdfCommand.ts
  • ExportToPdf.ts