Using property instead of method is faster
MODIFY
WalletWasabi.Backend/Controllers/ChaumianCoinJoinController.cs
WalletWasabi.Backend/Controllers/ChaumianCoinJoinController.cs
@@ -170,7 +170,7 @@ namespace WalletWasabi.Backend.Controllers
}
if (Coordinator.AnyRunningRoundContainsInput(inputProof.Input.ToOutPoint(), out List<Alice> tnr))
{
- if (tr.Union(tnr).Count() > tr.Count())
+ if (tr.Union(tnr).Count() > tr.Count)
{
return BadRequest("Input is already registered in another round.");
}
@@ -257,7 +257,7 @@ namespace WalletWasabi.Backend.Controllers
var acceptedBlindedOutputScripts = new List<uint256>();
// Calculate expected networkfee to pay after base denomination.
- int inputCount = inputs.Count();
+ int inputCount = inputs.Count;
Money networkFeeToPayAfterBaseDenomination = (inputCount * round.FeePerInputs) + (2 * round.FeePerOutputs);
// Check if inputs have enough coins.

MODIFY
WalletWasabi.Packager/Program.cs
WalletWasabi.Packager/Program.cs
@@ -696,7 +696,7 @@ namespace WalletWasabi.Packager
foreach (var file in assetsInfo.EnumerateFiles())
{
var number = file.Name.Split(new string[] { "WasabiLogo", ".png" }, StringSplitOptions.RemoveEmptyEntries);
- if (number.Count() == 1 && int.TryParse(number.First(), out int size))
+ if (number.Length == 1 && int.TryParse(number.First(), out int size))
{
string destFolder = Path.Combine(debUsrShareIconsFolderPath, $"{size}x{size}", "apps");
Directory.CreateDirectory(destFolder);

MODIFY
WalletWasabi/Models/ChaumianCoinJoin/CcjRound.cs
WalletWasabi/Models/ChaumianCoinJoin/CcjRound.cs
@@ -637,7 +637,7 @@ namespace WalletWasabi.Models.ChaumianCoinJoin
if (changeAmount < Money.Zero)
{
- if (acceptedBlindedOutputScriptsCount < alice.BlindedOutputScripts.Count())
+ if (acceptedBlindedOutputScriptsCount < alice.BlindedOutputScripts.Length)
{
tinkerWithAdditionalMixingLevels = false;
}

MODIFY
WalletWasabi/Services/WalletService.cs
WalletWasabi/Services/WalletService.cs
@@ -340,7 +340,7 @@ namespace WalletWasabi.Services
}
}
- if (cnt != unconfirmedTransactions.Count())
+ if (cnt != unconfirmedTransactions.Length)
{
SerializeTransactionCache();
}

Using property instead of method is faster