You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After PR #53 method ManageMediaCopy uses Sha256 hash algorithm for duplicate media detection purposes.
But all media is zipped, so it's possible to use Crc32 checksum from every zip entry. This approach could remove unnecessary Sha calculation with an IO operation (read & hash) because Crc32 is already precomputed and available.
ZipArchiveEntry.Crc32 property was added in NetCore2.1, so it's important to use it carefully due to the current target framework (netstandard2.0)
Unfortunately, this property can't be easily accessed, so the only way is to use reflection.
After PR #53 method
ManageMediaCopy
uses Sha256 hash algorithm for duplicate media detection purposes.But all media is zipped, so it's possible to use Crc32 checksum from every zip entry. This approach could remove unnecessary Sha calculation with an IO operation (read & hash) because Crc32 is already precomputed and available.
ZipArchiveEntry.Crc32
property was added in NetCore2.1, so it's important to use it carefully due to the current target framework (netstandard2.0)Unfortunately, this property can't be easily accessed, so the only way is to use reflection.
Simple example how it could be used:
srcObj
might beImagePart
orDataPart
.Rough GetInternalProperty implementation:
From my local tests it might improve performance by 15-20% on some large pptx file with many media elements 😄
The text was updated successfully, but these errors were encountered: