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

Move big chunk of HTML parser to cython #86

Merged
merged 18 commits into from Feb 11, 2016
Merged

Conversation

plafl
Copy link
Contributor

@plafl plafl commented Feb 9, 2016

Most of the regexps used for parsing HTML have been moved to hand coded cython code. Only attribute parsing (which is only executed when needed) is being parsed right now with regexps.

Benchmarks say that the new code is 3x faster (typical parse speed moved from 60ms to 30ms per page).

@ruairif
Copy link
Collaborator

ruairif commented Feb 9, 2016

Would you mind updating requirements.txt too?

@plafl
Copy link
Contributor Author

plafl commented Feb 9, 2016

requirements.txt has been updated already, but I'm working still in making travis compile the cython extension

@plafl
Copy link
Contributor Author

plafl commented Feb 10, 2016

At last, it passes all tests

ruairif added a commit that referenced this pull request Feb 11, 2016
Move big chunk of HTML parser to cython
@ruairif ruairif merged commit 6e34e95 into scrapy:master Feb 11, 2016
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

Successfully merging this pull request may close these issues.

None yet

2 participants