Skip to content

Commit 2bfd641

Browse files
committed
Remove Temporary Timing Data Collection
1 parent 5ad72eb commit 2bfd641

File tree

2 files changed

+8
-19
lines changed

2 files changed

+8
-19
lines changed

sources/SilkTouch/SilkTouch/Mods/Transformation/TransformationUtils.cs

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -259,16 +259,13 @@ is not { } idn
259259
GenericNameSyntax { TypeArgumentList.Arguments.Count: 1 } gn
260260
when gn.Identifier.ToString().AsSpan() is { Length: >= 3 } span
261261
&& span[..3] is "Ref" or "Ptr"
262-
&& (span.Length == 3 || span[^1] is 'D')
263-
=> span.Length == 3
264-
? gn.TypeArgumentList.Arguments[0]
265-
: byte.TryParse(span[3..^1], out var nd)
266-
? gn.WithIdentifier(
267-
nd <= 2
268-
? Identifier(span[..3].ToString())
269-
: Identifier($"{span[..3]}{nd - 1}")
270-
)
271-
: null,
272-
_ => null
262+
&& (span.Length == 3 || span[^1] is 'D') => span.Length == 3
263+
? gn.TypeArgumentList.Arguments[0]
264+
: byte.TryParse(span[3..^1], out var nd)
265+
? gn.WithIdentifier(
266+
nd <= 2 ? Identifier(span[..3].ToString()) : Identifier($"{span[..3]}{nd - 1}")
267+
)
268+
: null,
269+
_ => null,
273270
};
274271
}

sources/SilkTouch/SilkTouch/Naming/NameUtils.cs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,6 @@ public static async Task RenameAllAsync(
339339
bool includeCandidateLocations = false
340340
)
341341
{
342-
Stopwatch watch = Stopwatch.StartNew();
343342
if (ctx.SourceProject is null)
344343
{
345344
return;
@@ -399,10 +398,6 @@ await syntaxRef.GetSyntaxAsync(ct)
399398

400399
logger.LogDebug("{} referencing locations for renames for {}", locations.Count, ctx.JobKey);
401400

402-
watch.Stop();
403-
logger.LogInformation("Time to collect Symbol Reference Locations : {}", watch.Elapsed);
404-
watch.Restart();
405-
406401
// Now it's just a simple find and replace.
407402
var sln = ctx.SourceProject.Solution;
408403
var srcProjId = ctx.SourceProject.Id;
@@ -455,8 +450,5 @@ syntaxTree is null
455450
}
456451

457452
ctx.SourceProject = sln.GetProject(srcProjId);
458-
459-
watch.Stop();
460-
logger.LogInformation("Time to Replace Symbols : {}", watch.Elapsed);
461453
}
462454
}

0 commit comments

Comments
 (0)