I'm seeing .cpp files lag intermittently while typing. It happened to a lesser degree sometimes in v16, but now in v17 it can get to be pretty bad, where keystrokes can take up to a second to respond.
It seems like it could be related to the parsing/analysis functions that run for various as-you-type features (or maybe _as_callback which would have a similar impact to editing). I've noticed that while I'm inserting/editing lines inside a function for example in the middle of a 4000 line file, various as-you-type features can get very sluggish. I can't prove it yet, but it's starting to feel like the as-you-type parsing/analysis functions might be falling into degenerate cases that take too long when confronted with various patterns of invalid syntax (which can occur frequently while editing existing code).
This might explain the intermittency as well: while editing it could be slow, then once the edit is done you try to troubleshoot the slowness but now it's fine.