EPPlus usage
Commercial use (I have a commercial license)
Environment
Windows
Epplus version
8.6.3
Spreadsheet application
Excel
Description
See https://github.com/EPPlusSoftware/EPPlus/blob/develop8/src/EPPlus/ExcelPackageSettings.cs#L41
/// <summary>
/// Do not call garbage collection when ExcelPackage is disposed.
/// </summary>
public bool DoGarbageCollectOnDispose { get; set; } = true;
Suggestion 1: The summary comment is the exact oppositie of the configured default behaviour. They should align.
But on use, the garbage collection at the end can be heavy in Dispose:
if (Settings.DoGarbageCollectOnDispose)
{
GC.Collect();
}
Measured sometimes 500 ms. During that time, all other activity on a multi user application comes to a halt:
It performs a blocking garbage collection of all generations.
according to https://learn.microsoft.com/en-us/dotnet/api/system.gc.collect?view=net-10.0
Sample measurements on our eceltable function to parse Excel of 5 rows:
- Fresh: with GC on: 30 ms, disabled: 3 ms
- During load: with GC on: 500 ms, disabled 2-6 ms.
Suggestion is one of the following:
- configure default to not block all activity
- use different collection level
- change default when multi user environment / server GC (which is different anyway)
- reduce need for full generations GC
Workaround:
- Once established as a potential blocking of activity, change configuration in code to not do blocking GC.
- And/or: Use CreateExcelPackage.
EPPlus usage
Commercial use (I have a commercial license)
Environment
Windows
Epplus version
8.6.3
Spreadsheet application
Excel
Description
See https://github.com/EPPlusSoftware/EPPlus/blob/develop8/src/EPPlus/ExcelPackageSettings.cs#L41
Suggestion 1: The summary comment is the exact oppositie of the configured default behaviour. They should align.
But on use, the garbage collection at the end can be heavy in Dispose:
Measured sometimes 500 ms. During that time, all other activity on a multi user application comes to a halt:
according to https://learn.microsoft.com/en-us/dotnet/api/system.gc.collect?view=net-10.0
Sample measurements on our
eceltablefunction to parse Excel of 5 rows:Suggestion is one of the following:
Workaround: