0.101.0
Mostly speed improvements, but some cool and nifty improvements, see changelog below.
Other than some enums being changed from int to byte, and a new method on IXLGraphicEngine
interface there should be no breaking changes in the release (see https://closedxml.readthedocs.io/en/latest/migrations/migrate-to-0.101.html).
Worksheet saving (#1838)
Saving of cells in a worksheet has been significantly improved. As an example, a file of 100k rows and 44 columns (see gist) took 38 seconds to save in 0.100.3, but only 17 seconds in 0.101-rc .
Adjust to content (#1991)
Adjust to content has been refactored and it now calculates size of text by counting glyphs. Originally, we asked SixLabors.Fonts library to calculate it, but it is really slow (it has to deal with all possible typographic options, like having rtl and ltr text on same line).
It is faster to just use glyph size, plus I am pretty sure Excel also calculates width/height of a cell that way (likely legacy from earlier 90s version).
Time to run AdjustToContent
using a sample of 1000 rows.
Run# | 0.96.0 | 0.100.3 | 0.101-rc |
---|---|---|---|
1 | 168 ms | 1203 ms | 1674 ms |
2 | 4 ms | 568 ms | 31 ms |
3 | 4 ms | 551 ms | 25 ms |
4 | 4 ms | 540 ms | 26 ms |
5 | 3 ms | 544 ms | 25 ms |
6 | 3 ms | 550 ms | 26 ms |
7 | 4 ms | 556 ms | 46 ms |
8 | 3 ms | 556 ms | 28 ms |
9 | 4 ms | 541 ms | 23 ms |
10 | 3 ms | 535 ms | 23 ms |
Changelog
Performance improvements
- Improve performance when opening workbook by @lahma in #1998
- Change ExpressionCache to use ConditionalWeakTable by @lahma in #1968
- Separate XLCellFormula out of XLCell by @jahav in #1972
- Don't allocate XLCellFormula for each XLCell by @jahav in #2043
- Speedup adjust to content by @jahav in #2037
- Save SheetData through XmlWriter by @jahav in #1984
- Reimplement SEARCH function and add wildcard struct by @jahav in #2007
Features
- Calculate default column width from default font. by @nakamura2000 in #1954
- Add ability to load and save data table formulae by @jahav in #1974
- ROWS and COLUMNS functions by @jahav in #1981
Cleanup updates
- Remove unnecessary reference to Microsoft.CSharp by @lahma in #1999
- Simplify depdendency graph for newer target frameworks by @georg-jung in #1973
- Add a new XLCellValue.FromObject() method by @0xced in #1982
- Create SECURITY.md by @punkd23 in #1756
- Fix warnings by @leotsarev in #1695
- Update fonts library to beta19 by @jahav in #1971
Bugfixes
- fix: mixed types in table throws exception on save by @kappni in #2026
- Use space as culture group separator in AutoFilterTests by @lahma in #2000
- Fix NRE during normal style loading by @lahma in #2051
- Fix reserved fill value checking by @jahav in #1977
- Output unicode codepoints from astral planes by @jahav in #1978
- Remove exception from FIND function. by @jahav in #2018
- Fix negative text orientation. by @jahav in #2040
- Formula hyperlinks shouldn't have nodes in worksheet by @jahav in #2055
Documentation
- Add documentation about tables feature by @jahav in #2029
- Update Contributing - How to reconcile files by @NickNack2020 in #2045
New Contributors
- @lahma made their first contribution in #1968
- @georg-jung made their first contribution in #1973
- @punkd23 made their first contribution in #1756
- @kappni made their first contribution in #2026
Full Changelog: 0.100.3...0.101.0