This project is read-only.

AutoSizeColumn got slow in NPOI 2.0

Mar 22, 2013 at 10:58 AM
Dear NG,
I was wondering if anyone experienced a significant slow down when using ISheet.AutoSizeColumn. I have a sheet with 70 columns by 2000 rows. The process of auto-sizing all columns incresed from about 1s for all columns to ~0.3-0.5 seconds for each column. Any idea how to circumvent this problem?
Kind regards, Thomas
Feb 4, 2014 at 3:53 PM
I have the same problem with a sheet with only 5 columns and 5000 rows.
Each column take ~1s to resize.

Kind regards, Guillaume
Feb 16, 2014 at 1:41 AM
AutoSizeColumn needs to calculate text-based pixels. It must not be that fast. Be cautious when use it. But this is by design.
Aug 26, 2014 at 1:37 PM
Ok, I undertand the complexity of that operation, but given an xls file for which NPOI 2.0 takes about 10 minutes to autosize columns, Microsoft Excel accomplish the same task in less than a second (on the same machine). How can you explain that?
Sep 9, 2014 at 3:13 AM
AutoSizeColumn is too slow, EPPlus is faster。
Feb 10, 2015 at 9:30 AM
This issue is much more pressing than one would think. To extract 70k rows (around 25 columns) without autosizing took about 1 minute, I'm rarely able to extract the same amount with autosizing due to huge CPU load. This not only slows down the process, but hogs up all server resources so anyone within same application pool gets basically locked out of the application. I assume there might be some issues with our configuration, but we never saw this behavior before we upgraded to new NPOI version.

Please advise on alternative ways to sort this, it's not uncommon for us to extract over 10k rows, but anything over couple of thousand yields unacceptable results.
Feb 14, 2015 at 10:13 PM
I'll check how EPPlus make it.
Apr 4 at 10:12 PM
Any progress on this? I'm on version 2.1.0 and AutoSizeColumn is extremely slow. It takes up to 20s to process a small document.

Side note: since codeplex is shutting down, wouldn't it be best to allow people to create issues on Github?