Closed ghaith closed 1 month ago
Did some quick research and it looks like I have unlocked an achievement, unintentionally fucking up the performance by a lot due to https://github.com/PLC-lang/rusty/commit/94a74fd429b0e3da03e795e181342823fa402615. Specifically the find_local_member
method internally calls find_enum_variant_in_pou
which works on raw (sub)string comparisons. I knew it would have some performance penalties (especially because there's no caching for already performed queries) but I didn't think it would be this bad. Anyways, seems like we need to refactor how enums are stored in the index hence closely related to https://github.com/PLC-lang/rusty/issues/1112.
Picture of plc check ...
profile, previously taking around 4 seconds on an internal project but now takes between 2 and 4 minutes
Also https://plc-lang.github.io/metrics/ wasn't able to detect any performance regressions, we really need to find some big open source library which we can include in the metrics...
It might be the change with the parser errors, but I noticed that on big projects a lot of time would pass before we see the first error. We should investigate that.