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

Slow to very slow checks for urls #60

Open
Tijs-2 opened this issue Jun 2, 2020 · 1 comment
Open

Slow to very slow checks for urls #60

Tijs-2 opened this issue Jun 2, 2020 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@Tijs-2
Copy link

Tijs-2 commented Jun 2, 2020

Our spider found a url with a lot of underscores. The website was a mess so they screwed up but nevertheless it exists in the wild.

If you have a url like 'http://______text' it is no problem

But if you do a check like this:
checkers.is_url("http://a_____________text_________done")
it already takes seconds

But then if you do it like this:
checkers.is_url("http://a______________________________________________________________text_________done")
you will be able to get a cup of coffee before the answer is there :) (I never waited until the end ;) )

@insightindustry insightindustry self-assigned this Jun 19, 2020
@insightindustry insightindustry added the bug Something isn't working label Jun 19, 2020
@insightindustry
Copy link
Owner

I've taken a look at this issue, and the problem lies in a performance cliff in the regex matching that applies to URLs. It'll take some amount of effort to further optimize the regex expression used for URLs, and unfortunately the "easy" solution of using a better regex engine isn't an option given the design constraints of the library. However, the regex expressions used are quite complicated and I'm pretty certain there's a lot of performance optimization that can be done. However, I'm going to bump this milestone to not the next version, but the version after that so that it doesn't hold up the next release.

@insightindustry insightindustry added this to the v.1.4.3 milestone Jun 19, 2020
@insightindustry insightindustry removed this from the v.1.4.3 milestone Oct 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants