CommonRegex icon indicating copy to clipboard operation
CommonRegex copied to clipboard

costs much cpu resource & time

Open Ru7z opened this issue 8 years ago • 2 comments

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)

Ru7z avatar Apr 20 '16 06:04 Ru7z

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.

madisonmay avatar Apr 27 '16 18:04 madisonmay

@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.

rfdickerson avatar Apr 16 '18 14:04 rfdickerson