| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
|
Given that the collections are populated in the class constructors, I had a go at just constructing the lists with the required capacity rather than resizing them after creation. |
Sorry, something went wrong.
Given that we know how many properties there are, we can reserve the required amount of space so that the lists don't have to grow when properties are added during the file load. This saves a few allocations.
| } | ||
|
|
||
| // Build the User Defined properties container, if the property set is present. | ||
| if (pStream.NumPropertySets == 2) |
There was a problem hiding this comment.
On a related note (not part of this change, something that could be a separate issue) - the PropertySetStream documentation states
The current logic always reads the second property set if present, but it could validate this requirement (same on writing - making sure it doesn't write the UserDefinedProperties set for any parent other than DocSummaryInformation may or may not be something that could be controlled by a strict validation flag
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Given that we know how many properties there are, we can specify the inital capacity so that the lists don't have to grow when properties are added during the file load.
Just a thought when testing things - it saves a few allocations by not having to resize the lists when populating them
Before
After:
Any thoughts?