Static cache takes up too much memory
- Dominant language
- C#
- Stars
- 4.6k
- Forks
- 605
- PR merge metrics
- No merged PRs in 30d
Description
# Before submitting an issue, please fill this out
Is this a:
- [x] Issue with the OpenXml library
- [ ] Question on library usage
If you have answered that this is a question, please ask it on StackOverflow instead of here.
This issue tracker is meant to track product issues while StackOverflow excels at answering questions
---------------- Remove this line and above before posting ----------------
**Description**
I capture my application by dot Memory tool. And I find the OpenXML SDK take up too many memories to cache.

My application will use the OpenXML SDK to read the file once, and it means that the cache in SDK is wasteful
**Information**
- .NET Target: ALL
- DocumentFormat.OpenXml Version: 2.13.0
**Repro**
Not special
**Observed**
The OpenXML SDK take up too many memories to cache.
**Expected**
We can free it manual.
Contributor guide
Research direction
The report names no source file, test, or concrete reproduction beyond using OpenXML SDK 2.13.0 with a memory profiler. Start by reproducing the static-cache growth with the reported single-read scenario and trace the cache ownership in the SDK. Done means identifying the retained cache and providing a supported way to release it manually without breaking subsequent SDK use.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- performance
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100