Skip to content

[BUG] - Potential Memory Retention When FastMode Is Enabled in OpenXmlConfiguration #963

@The-Mojoo

Description

@The-Mojoo

Hi,

I noticed a possible memory retention issue when enabling FastMode in OpenXmlConfiguration.

I understand that the purpose of FastMode is to trade higher memory usage for better export performance, so some additional memory consumption is expected. However, during repeated export operations, the process memory keeps increasing continuously and does not seem to be released afterward.

Environment

  • MiniExcel version: 1.44.1
  • .NET version: .Net 8
  • OS: Windows 11

Scenario

I am exporting around 100,000 rows of data repeatedly.

With FastMode = true

  • Export performance improves as expected.
  • However, memory usage keeps growing after each export.
  • The memory does not fall back after the export is completed.
  • After multiple exports, memory usage becomes significantly higher ("snowballing").

With FastMode = false

  • Memory usage remains relatively stable.
  • Repeated exports do not cause continuous memory growth.

My Concern

I am not sure whether this is expected behavior, a limitation of FastMode, or possibly a resource/memory release issue internally.

I suspect that some objects or buffers may not be getting released properly after export completion.

Additional Notes

  • The issue is reproducible with repeated exports.
  • The exported dataset size is approximately 100k rows.
  • GC does not appear to reclaim the increased memory effectively when FastMode is enabled.

Could you please help confirm whether this behavior is expected, or if there might be a memory leak/resource retention issue related to FastMode?

Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions