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

Avoid linear scan operation on large strings. #402

Merged
merged 2 commits into from
Feb 12, 2021

Conversation

CyrusNajmabadi
Copy link
Contributor

Andrew pointed out a good optimization to add here. We shoudln't call GetByteCount on huge strings that certainly will never have a utf8 encoding that is within our threshold.

@CyrusNajmabadi
Copy link
Contributor Author

FYI @ericsink . This woudl be a good optimization to prevent expensive work if peopel are inserting large strings.

@ericsink
Copy link
Owner

Yes. I thought I added a positive comment on this yesterday, but alas, it's not here. :-(

@ericsink ericsink merged commit 6027df0 into ericsink:master Feb 12, 2021
@ericsink ericsink mentioned this pull request Aug 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants