Skip to content

Commit

Permalink
Removed performance TODOs about string -> bytes conversion.
Browse files Browse the repository at this point in the history
  • Loading branch information
CptMoore committed Feb 8, 2025
1 parent e7b20f0 commit da7c6b8
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions ModTek/Features/Logging/Formatter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,6 @@ internal void SerializeMessage(ref MTLoggerMessageDto messageDto, FastBuffer buf
buffer.Append(s_threadIdSuffix);
}

// TODO create injector and add a nameAsBytes field that should be passed along instead of string
// should improve performance by 20% since string/char[] -> byte[] is slow
buffer.Append(messageDto.LoggerName);

buffer.Append(LogLevelExtension.GetFormattedBytes(messageDto.LogLevel));
Expand All @@ -63,8 +61,6 @@ internal void SerializeMessage(ref MTLoggerMessageDto messageDto, FastBuffer buf
if (messageDto.Exception != null)
{
buffer.Append(prefix);
// TODO find a faster (pinvoke?) method for conversion
// this takes like 60-80% of the formatting time
buffer.Append(messageDto.Exception.ToString());
prefix = s_environmentNewline;
}
Expand Down

0 comments on commit da7c6b8

Please sign in to comment.