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

Preallocate apply_text_changes result #140

Open
dsherret opened this issue Mar 22, 2023 · 0 comments
Open

Preallocate apply_text_changes result #140

dsherret opened this issue Mar 22, 2023 · 0 comments
Labels

Comments

@dsherret
Copy link
Member

let mut final_text = String::new();

We can pre-allocate this based on the current string length and the text changes.

@dsherret dsherret added the perf label Mar 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant