mirror of
https://github.com/claunia/plist-cil.git
synced 2026-02-04 05:34:41 +00:00
[PR #36] [MERGED] Add support for Span<byte> #61
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/claunia/plist-cil/pull/36
Author: @qmfrederik
Created: 6/18/2018
Status: ✅ Merged
Merged: 6/19/2018
Merged by: @claunia
Base:
master← Head:fixes/array-length📝 Commits (4)
64c9f13Add support for Span3df861eBump Travis versionc82174fBring back netstandard1.x33542f4Bring back netcoreapp1.0📊 Changes
5 files changed (+134 additions, -50 deletions)
View changed files
📝
.travis.yml(+1 -1)📝
plist-cil/ASCIIPropertyListParser.cs(+28 -0)📝
plist-cil/BinaryPropertyListParser.cs(+46 -29)📝
plist-cil/PropertyListParser.cs(+40 -2)📝
plist-cil/plist-cil.csproj(+19 -18)📄 Description
We're doing a performance review of our application and are trying to make sure of the new
Span<byte>andReadOnlySpan<byte>types which are new in .NET land.For plist-cil, working with
Span<byte>opens a lot of opportunities:byte[]array (e.g. starting at index 10 and a length of 42), without having to copy that subset to a new array (which has a performance impact)This PR adds support for reading property lists form those types to plist-cil.
It comes with a couple of drawbacks, though. That includes:
netstandard1.xandnetcoreapp1.x). It appears there's a big push to get everyone to use at leastnetstandard2.0, so that should be OKSupporting .NET Framework without adding a dependency on System.Memory and still adding support for
Span<byte>would mean duplicating a lot of code, and I'm not sure it's worth it.Would this be a problem for you?
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.