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

Reuse the same CssSelectorConverter #152

Merged
merged 1 commit into from
Sep 5, 2016

Conversation

stof
Copy link
Collaborator

@stof stof commented Jul 22, 2016

Initializing the CSS converter is a bit heavy. Reusing the same instance for all rules instead of creating a new one each time leads to a major performance boost (-20% time spent when running the example).
This optimization is possible only when using the Symfony CssSelector component 2.8+. The old API from Symfony 2.7 and older does not allow to perform it, as it exposes only a static method.

Initializing the CSS converter is a bit heavy. Reusing the same instance
for all rules instead of creating a new one each time leads to a major
performance boost (-20% time spent when running the example).
This optimization is possible only when using the Symfony CssSelector
component 2.8+. The old API from Symfony 2.7 and older does not allow to
perform it, as it exposes only a static method.
@tijsverkoyen tijsverkoyen merged commit e4ba269 into tijsverkoyen:master Sep 5, 2016
@stof stof deleted the faster_xpath_conversion branch September 5, 2016 10:30
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.

2 participants