Skip to content

Performance

XLFill is designed to be fast enough that performance is never a concern for typical report generation. Here are the numbers.

Measured on Intel i5-9300H @ 2.40GHz:

ScenarioRowsTimeMemoryThroughput
Simple 3-column template1005.3ms1.8 MB~19,000 rows/sec
Simple 3-column template1,00030ms9.4 MB~33,000 rows/sec
Simple 3-column template10,000279ms85.6 MB~35,800 rows/sec
Nested loops (10 groups x 20 items)2002.2ms872 KB~91,000 rows/sec
Single expression evaluation1199ns48 B~5M evals/sec
Single comment parse14.1us1 KB~244K parses/sec

Linear scaling — processing time grows linearly with the number of rows. 10x more rows = ~10x more time. No surprises.

~8.7 KB per row at scale — memory usage is dominated by the Excel file representation in excelize. For 10,000 rows, expect ~87 MB.

Expression caching — expressions are compiled once on first encounter and cached. Subsequent evaluations of the same expression hit the cache, giving ~5 million evaluations per second.

Comment parsing — template comments are parsed at ~244K per second. Even a template with hundreds of commands parses in under a millisecond.

Report sizeExpected time
Small (100 rows)Instant — under 6ms
Medium (1,000 rows)~30ms — imperceptible
Large (10,000 rows)~280ms — still fast
Very large (100,000 rows)~3 seconds — consider streaming

For comparison, the time to open a 10,000-row Excel file in the Excel application is typically longer than the time XLFill takes to generate it.

  1. Keep templates simple — fewer expressions per row means faster evaluation
  2. Filter early with selectjx:each(... select="e.Active") is faster than generating rows you’ll discard
  3. Avoid deep nesting — each nesting level multiplies the work. Three levels deep with large collections can add up
  4. Minimize formula references — formula expansion scans all formulas after each command. Templates with hundreds of formulas in the expanded area may see overhead
  • Go 1.24+
  • .xlsx files only (the .xls binary format is not supported)

Having trouble with a template? XLFill ships with built-in tools for inspecting and validating templates:

Debugging & Troubleshooting →