Improve search aria label generation performance#34491
Conversation
|
I think that it's also due to the search tool producing large amounts of text and sending it all back from the search process. Also, it looks like we are still calling .preview for every match anyway? But the call you've replaced was definitely unnecessary so it looks like a good optimization. I'll try it out, thanks! |
|
I did not remove the other preview call because it would alter the existing behavior. That said, I managed to rewrite the |
|
The aria label change is a huge speedup! Nice find. The lcut change looks good too. Do you want to add it to the PR? I can just copy it in but I want to give you credit. |
|
We should have some unit tests for that function before we rewrite it. |
|
I'll leave |
When using search, if a matched line is really long (i.e. from a minified file), the UI freezes briefly because of a call to
strings.lcut()which internally callssplit(/\b/). This change removes the call with no change to behavior.