Stream: t-compiler/rust-analyzer

Topic: `syntax_highlighting_not_quadratic` failure


Aramis Razzaghipour (May 29 2021 at 03:53, on Zulip):

My PR is failing due to the syntax_highlighting_not_quadratic test, but nothing in the PR seems non-linear. Anyone have any idea why this is happening?

Laurențiu (May 29 2021 at 08:37, on Zulip):

I don't see anything wrong with the PR, maybe the test is too strict.

matklad (May 31 2021 at 09:30, on Zulip):

I need to look closer into it, but it definitely is quadratic. The PR adds is_public check, so presumably that is linear, rather than O(1)?

Playing with the test locally and looking at https://github.com/rust-analyzer/rust-analyzer/blob/master/docs/dev/README.md#profiling might help to confirm this

Laurențiu (May 31 2021 at 09:32, on Zulip):

Or we could also try plotting the time without the PR changes, just to check that it's really linear right now.

matklad (May 31 2021 at 10:24, on Zulip):

plot.svg

matklad (May 31 2021 at 10:25, on Zulip):

Good suggestion! It looks like it is quadratic rn?

Last update: Jul 24 2021 at 20:00UTC