BigBahss / vscode-cmantic

C/C++ code generation for VS Code: Generate Definitions, Getters, Setters, and much more.
https://bigbahss.github.io/vscode-cmantic/
MIT License
82 stars 9 forks source link

Generate Getter/Setter performance regression #29

Open BigBahss opened 3 years ago

BigBahss commented 3 years ago

I've noticed a regression in the amount of time it takes to generate getters and setters (even with C_mantic.cpp.resolveTypes disabled). It used to be very quick, and now it seems to hang for a couple seconds (sometimes more) before they are generated. I'm not sure what could be causing this, since it's the only feature that is having this problem. This "slowness" is also independent of the language server, so it must be something in the C-mantic code (In general, clangd is much faster than cpptools, which is usually a good indication of whether a problem exists with C-mantic or the language server. This is not the case here).

For reference, the GIF in the README was real-time performance of generating a getter and setter, and that was with C_mantic.cpp.resolveTypes enabled. Trying it on the same code now takes 2-3 seconds on my machine. With C_mantic.cpp.resolveTypes disabled it's about 1-2 seconds, still noticeably slower.

BigBahss commented 3 years ago

This will be improved in the next release. Not completely fixed, but better.

Edit: This improvement was implemented in v0.8.1