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

Missing timeout propagation in Automaton::Determinize #3

Open
davisjam opened this issue Apr 16, 2019 · 0 comments
Open

Missing timeout propagation in Automaton::Determinize #3

davisjam opened this issue Apr 16, 2019 · 0 comments

Comments

@davisjam
Copy link

The API Automaton::Determinize accepts a timeout parameter.

  1. FWIW this parameter is in milliseconds. It would be nice to document that.
  2. The timeout is not propagated recursively when the call to TryDecompose succeeds and d.Determinize() is called. So a regex consisting of a large disjunction exhibits exponential (?) behavior and the requested timeout is ignored.

I can open a PR if interested. The patch seems simple -- add the timeout to the recursive call.

@davisjam davisjam changed the title Missing timeout in Automaton::Determinize Missing timeout propagation in Automaton::Determinize Apr 16, 2019
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

No branches or pull requests

1 participant