Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Cache.ReadOnlyCollection<OpenXmlAttribute> for OpenXmlDomReader.Attributes #705

Merged

Conversation

@lindexi
Copy link
Contributor

lindexi commented Mar 20, 2020

The original code used the List type. This type will request a piece of memory by default.

Because we also need to support the .NET Framework versions below 4.6, and these versions do not exist Array.Empty method. See https://docs.microsoft.com/en-us/dotnet/api/system.array.empty

The _emptyReadOnlyList field is only used here as the return value

The original code used the List type. This type will request a piece of memory by default.
Copy link
Collaborator

twsouthwick left a comment

Once you update to Cached.Array I'll merge it. Thanks for the contribution!

@lindexi lindexi requested a review from twsouthwick Mar 21, 2020
@lindexi lindexi requested a review from twsouthwick Mar 21, 2020
…to t/lindexi/WelyemjakayKalllujole
@twsouthwick

This comment has been minimized.

Copy link
Collaborator

twsouthwick commented Mar 23, 2020

Build's failing because usings aren't sorted. Sorry for the back and forth. We're working on getting the builds visible; we have warnings as errors, so if you see any errors locally, it'll fail.

Copy link
Collaborator

twsouthwick left a comment

Build needs to pass :)

@twsouthwick twsouthwick changed the title Save unnecessary memory usage Use Cache.ReadOnlyCollection<OpenXmlAttribute> for OpenXmlDomReader.Attributes Mar 23, 2020
We have warnings as errors
Copy link
Collaborator

twsouthwick left a comment

Thanks for the contribution!

@twsouthwick twsouthwick merged commit 54284c8 into OfficeDev:master Mar 24, 2020
3 checks passed
3 checks passed
OfficeDev.Open-XML-SDK #2.10.2-t-lindexi-WelyemjakayKalllujole.14 succeeded
Details
WIP Ready for review
Details
license/cla All CLA requirements met.
Details
@lindexi

This comment has been minimized.

Copy link
Contributor Author

lindexi commented Mar 24, 2020

@twsouthwick Thank you. You are very fast, I haven't compiled it locally, because my Internet speed is very poor, I'm still waiting for NuGet to restore

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.