x/tools/gopls: panic in fillstruct analyzer #39899
Labels
FrozenDueToAge
gopls
Issues related to the Go language server, gopls.
Tools
This label describes issues relating to any tools in the x/tools repository.
Milestone
While experimenting with stress tests for gopls, I discovered that the new fillstruct analyzer causes a significant spike in CPU utilization: 5x more CPU in a test that just types randomly in github.com/pilosa/pilosa (a module for which gopls has historically had performance problems).Almost all of this type is formatting the modified AST (printer.Fprint) to generate suggested edits.I can provide more details if necessary, but it should be pretty easy to reproduce (just open pilosa and type). We probably should avoid computing this suggested fix on every keypress.Oops, it appears that the reason fillstruct was implicated was that it was panicking, and the way I had structured my stress test led to other results hitting the cache, whereas fillstruct missed the cache due to the panic below.
We've since produces more generalized mayhem by updating the stress test to type more randomly...
Updated this issue to instead refer to the fillstruct panic.
CC @joshbaum @stamblerre
The text was updated successfully, but these errors were encountered: