-
Notifications
You must be signed in to change notification settings - Fork 1
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
Unnecessary re-compile in riak_kv_wm_object #30
Comments
The majority of the time is in compiling the regex not applying it. string:split(Terms, ", ", all) is marginally quicker than re:split(Terms, ",\s", [{return, binary}]) if Terms is already a binary (otherwise an iolist_to_binary/1 call is required first (And this will be slower). There may be subtle functional differences between string:split and re:split |
Overall re split may be better than string:split ...
Term is a single IndexTerm. TermList is 10 comma/space separated terms. TermListB is TermList but as a binary (i.e. iolist_to_binary(TermList)) |
To process a PUT via riak_kv_wm_object, there are three regular expressions compiled:
Links are. a deprecated feature, and the expressions are still compiled even if the links are empty.
Index field splitting is required, but would be more efficiently done with string:split (although there are some subtle differences with output in this case if the input is not a binary).
The text was updated successfully, but these errors were encountered: