Add caching to IFont2Font#1179
Conversation
|
The caching result is really impressive! |
|
LGTM |
I'm hoping that generally the value is always an integer so shouldn't matter that much. Just wanted to make sure nobody creates a font-loader bomb with an excel that has different font size in every cell and just by decimals. |
|
Thank you for improving the performance so soon after I commented on it yesterday, the benchmarks you posted look great! I rolled back to 2.5.6 but look forward to upgrading to 2.7.0 when it's out. |
|
This is the correct approach. ClosedXML has introduced incorrect measurements by using custom measurements based upon the advance of individual glyphs. I've worked hard to ensure that text measurement is fast and accurate (proper bidi layout and shaping is incredibly complicated) but would always recommend a font file is primed for consumption. |
|
@JimBobSquarePants It's nice to meet Six Labors staff here. |
Adding caching to font creation as it can be quite costly. Showing the difference it makes by creating benchmark for
AutoSizeColumn.NPOI.Benchmarks.AutoSizeColumnBenchmark