Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

perf(ivy): improve styling performance #33326

Closed
wants to merge 2 commits into from

Commits on Oct 22, 2019

  1. perf(ivy): improve styling performance

    change the existing implementation from using
    
    ```
    string.split(/\s+/);
    ```
    
    to a char scan which performers the same thing.
    
    The reason why `split(/\s+/)` is slow is that:
    - `/\s+/` allocates new `RegExp` every time this code executes.
    - `RegExp` scans are a lot more expensive because they are more powerful.
    mhevery committed Oct 22, 2019
    Copy the full SHA
    15c4d3d View commit details
    Browse the repository at this point in the history
  2. Copy the full SHA
    8f46690 View commit details
    Browse the repository at this point in the history