Repository navigation
Faster walStrings - #148
Merged
Merged
Conversation
Owner
|
Will test in the next few days and commit. I apologize for the super long delay. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replaced the code to use regex. This is much faster now. Also added deduplication, so strings don't show up multiple times.
The speed improvement is big. On the one I am testing on, it went from 40 seconds down to 7 seconds (ascii char matching) or 8 seconds (unicode char matching).
I'm not merging this yet because there are some issues to be considered. The old code was only getting ASCII chars, as it was filtering characters with
string.printable, which only works for printable ascii characters. That is good if you know you are only going to have English language text.Enabling unicode matching is better in theory as you get English + any other language characters, but that also means that you get a lot of garbage too (especially if you are primarily looking for English text).
The description in the plugin says ASCII & Unicode both, but it was only getting ASCII earlier.
The current code keeps old behavior (ASCII only), but you can toggle to full Unicode (which automatically gets you ASCII too) on line 38/39.