Did you happen to open your main menu shortly before the lags happened? Because the friendslist (re)loading is known to cause a lot of lag & stutters, editing that out of your mainmenuoverride.res could at least solve that problem.
Blocking any incoming party requests is also a good idea, since spamming those can lag out and completely lock up someone's game.
tf_party_ignore_invites 1
tf_party_join_request_mode 2 // The current mode for incoming party join requests: -1 - Use default (currently 0) | 0 - Open to friends | 1 - Friends can request to join | 2 - Invite only