Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[DomCrawler] Improve namespace discovery performance #14012

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

Merged
merged 1 commit into from
Mar 23, 2015

Conversation

jakzal
Copy link
Contributor

@jakzal jakzal commented Mar 21, 2015

Q A
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets #12298
License MIT
Doc PR -

Before this quick-fix, xpath axes like child::* or descendant-or-self::* were considered namespaces. As a result, far too many xpath queries were being executed during namespace discovery.

Here's a full blackfire before/after comparision of @salaman's script: https://blackfire.io/profiles/compare/a80b9e77-8e55-45d3-a348-7d34a51053b6/graph

domcrawler-xpath-query

Up until now xpath axes (child::*, descendant-or-self::** etc) were considered namespaces.
As a result, far too many xpath queries were being executed while namespace discovery.
@xabbuh
Copy link
Member

xabbuh commented Mar 22, 2015

Nice! 👍

@stof
Copy link
Member

stof commented Mar 22, 2015

👍

@jakzal can it be applied to 2.3 easily ?

@pborreli
Copy link
Contributor

💐

@tristanbes
Copy link
Contributor

wow, nice

@aitboudad
Copy link
Contributor

👍

1 similar comment
@dunglas
Copy link
Member

dunglas commented Mar 22, 2015

👍

@salaman
Copy link

salaman commented Mar 22, 2015

This worked wonders on my script, glad I was of (some) help. 👍

@jakzal
Copy link
Contributor Author

jakzal commented Mar 22, 2015

@stof it doesn't affect 2.3. Namespace discovery was introduced later.

@fabpot
Copy link
Member

fabpot commented Mar 23, 2015

Thank you @jakzal.

@fabpot fabpot merged commit b6af002 into symfony:2.6 Mar 23, 2015
fabpot added a commit that referenced this pull request Mar 23, 2015
This PR was merged into the 2.6 branch.

Discussion
----------

[DomCrawler] Improve namespace discovery performance

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #12298
| License       | MIT
| Doc PR        | -

Before this quick-fix, xpath axes like `child::*` or `descendant-or-self::*` were considered namespaces. As a result, far too many xpath queries were being executed during namespace discovery.

Here's a full blackfire before/after comparision of @salaman's script:  https://blackfire.io/profiles/compare/a80b9e77-8e55-45d3-a348-7d34a51053b6/graph

![domcrawler-xpath-query](https://cloud.githubusercontent.com/assets/190447/6767384/ba93c57a-d024-11e4-84e1-e58dd7527f03.png)

Commits
-------

b6af002 [DomCrawler] Improve namespace discovery performance
@jakzal jakzal deleted the hotfix/domcrawler-performance branch March 23, 2015 07:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.