Skip to content

Commit b2cdba0

Browse files
Remove stale commented-out input-size-limit code in AssemblyCompression.cs (#11677)
* Initial plan * [Xamarin.Android.Build.Tasks] Remove stale commented-out input-size-limit code Co-authored-by: jonathanpeppers <840039+jonathanpeppers@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: jonathanpeppers <840039+jonathanpeppers@users.noreply.github.com>
1 parent a2dfe8c commit b2cdba0

1 file changed

Lines changed: 0 additions & 10 deletions

File tree

src/Xamarin.Android.Build.Tasks/Utilities/AssemblyCompression.cs

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -47,13 +47,6 @@ public void SetData (string sourcePath, uint descriptorIndex)
4747

4848
const uint CompressedDataMagic = 0x5A4C4158; // 'XALZ', little-endian
4949

50-
// TODO: consider making it configurable via an MSBuild property, would be more flexible this way
51-
//
52-
// Arbitrary limit of the input assembly size, to clamp down on memory allocation. Our unlinked Mono.Android.dll
53-
// assembly (the biggest one we have) is currently (May 2020) around 27MB, so let's bump the value to 30MB times
54-
// two - it should be more than enough for most needs.
55-
//public const ulong InputAssemblySizeLimit = 60 * 1024 * 1024;
56-
5750
static readonly ArrayPool<byte> bytePool = ArrayPool<byte>.Shared;
5851

5952
static CompressionResult Compress (AssemblyData data, string outputFilePath)
@@ -71,9 +64,6 @@ static CompressionResult Compress (AssemblyData data, string outputFilePath)
7164
var fi = new FileInfo (data.SourcePath);
7265
if (!fi.Exists)
7366
throw new InvalidOperationException ($"File '{data.SourcePath}' does not exist");
74-
// if ((ulong)fi.Length > InputAssemblySizeLimit) {
75-
// return CompressionResult.InputTooBig;
76-
// }
7767

7868
data.DestinationPath = outputFilePath;
7969
data.SourceSize = checked((uint)fi.Length);

0 commit comments

Comments
 (0)