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

costs much cpu resource & time #22

Open
Ru7z opened this issue Apr 20, 2016 · 2 comments
Open

costs much cpu resource & time #22

Ru7z opened this issue Apr 20, 2016 · 2 comments

Comments

@Ru7z
Copy link

Ru7z commented Apr 20, 2016

Thanks for build this commonregex and convenient to our works,but i still have a question.
Why it costs too much time?Also my cpu temperature rise rapidly.(the length of my content is 105851 bytes)

@madisonmay
Copy link
Owner

Because these are fairly complex regular expressions the space you have to search to check whether any of the patterns match expands pretty rapidly. To help mitigate this I would use only the regular expressions that you need for your project, as the default option runs the entire set.

@rfdickerson
Copy link

@ru1996 I'm curious if you have a specific example of some strings that cause this performance issue.

I also have been suffering in certain cases over 30s to evaluate a particular string for a regex pattern. Most cases, though, it finishes in a millisecond. For instance, strings with too many periods. .................................................................................................................. seems to cause the links URL pattern to take too long to evaluate.

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

3 participants