mirror of
https://github.com/storytold/gridcraft.git
synced 2026-11-09 03:49:54 -06:00
auto_row_height() picked the merges touching a row by scanning every merge on the sheet, and opening a workbook (fit_imported_rows) or a commit fitting many rows called it per row, so rows x merges comparisons ran synchronously on open. Rows are fitted in ascending order, so a MergeSweep sorts the sheet's merges by first row once and keeps only those active on the current row. All comparisons count against MERGE_FIT_WORK (50,000,000) per pass; past it the remaining rows keep the heights they have. auto_row_height keeps its signature for single rows.