Chatting causes lag to occur
Relates to MC-65587 and MC-225777
Possibly related to MC-131219, however, that bug takes place when you open chat; this is once you've hit enter to put something in the chat.
The bug
Often, I want to make a note to myself in singleplayer of something like coordinates. But lately, when I attempt to place such information in chat, it causes the game to freeze for a second for no reason even though I am in singleplayer.
Steps to reproduce:
1. Log into a singleplayer world that isn't open to LAN, etc.
2. Type something in chat and hit enter when you are done.
-->
Notice the big lag spike.
Additional Information
Note: It doesn't always happen, and it doesn't happen twice in a row.
Another note: Significantly less lag in 21w18a, but still there.
It seems like the game is trying to access the log and that is why it causes so much lag. It also occurs with command feedback. and feedback from debug profiling, but only the message including where the profile saved.