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

Develop to Master #367

Merged
merged 11 commits into from
May 29, 2020
Merged

Develop to Master #367

merged 11 commits into from
May 29, 2020

Conversation

chiragjn
Copy link
Contributor

  • Fix MemoryError for RegexDetector
  • cleanup dead code related to gunicorn

chiragjn added 11 commits May 7, 2020 16:53
Set DEBUG=False, no more configurable from .env
                     limit max_matches to 50 by default

When replacing something like 'ab' -> 'abab' or '' with anything in a loop can grow string
causing more and more allocations, eventually crashing with MemoryError.
We fix this by doing careful replacements with a special placeholder and
also discarding empty matches and limiting matches to keep the detector
fast. The max_matches part is configurable via __init__
https://hello-haptik.atlassian.net/browse/ML-1443
fix(regex-detector): Fix MemoryError caused by recursive replace and limit max_matches to 50 by default
Cleanup - Remove gunicorn and start_server.sh
@srajdev
Copy link
Contributor

srajdev commented May 27, 2020

👍 No lint errors found.

@chiragjn chiragjn merged commit e7c3146 into master May 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants