Skip to content

Is regex-automata's PatternID configurable #1181

Answered by BurntSushi
masklinn asked this question in Q&A
Discussion options

You must be logged in to vote

I assume the pattern / PatternID feature of regex-automata is the underlying support for regex::RegexSet, however when there are a lot of non-trivial (non-literal) regexes RegexSet / new_many doesn't really work as (as far as I've been able to test) it builds a giant automaton which takes a huge amount of memory and is very slow.

Yeah, it can indeed be quite slow. If you're willing to use more memory, you can set a higher dfa_size_limit which might help with search performance.

Is there a way to build a regex_automaton::meta::Regex with a user-specified PatternID, in order to use that as payload? Or is it not actually reified but generated on the fly when matching the automaton?

No th…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@masklinn
Comment options

Answer selected by masklinn
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants