Improved Spreadsheets

Changed how Spreadsheets recalculate formulas

An edit now recalculates only the formulas that depend on it, in dependency order, with published limits per pass.

Changed formula calculation. Calculated values are kept until an edit changes a cell they depend on; the edited cell and its dependents are then recalculated in dependency order, so a cell read by many formulas is calculated once. Every cell in a circular reference shows #ERROR!. One pass evaluates up to 100,000 formula cells or 200 milliseconds and follows at most 100 uncalculated references in one chain; cells left over show #ERROR! until the following pass, which starts immediately. Long reference chains that previously could stop the page with a stack overflow now calculate in passes.