René's URL Explorer Experiment


Title: Quadratic behavior in xml.etree.ElementPath Index Predicates · Issue #152674 · python/cpython · GitHub

Open Graph Title: Quadratic behavior in xml.etree.ElementPath Index Predicates · Issue #152674 · python/cpython

X Title: Quadratic behavior in xml.etree.ElementPath Index Predicates · Issue #152674 · python/cpython

Description: Element.findall() and fully-consumed Element.iterfind() exhibit O(n^2) time complexity when using XPath index predicates ([1], [last()], [last()-N]) on XML documents with many same-tag siblings. Element.find() is only affected when the f...

Open Graph Description: Element.findall() and fully-consumed Element.iterfind() exhibit O(n^2) time complexity when using XPath index predicates ([1], [last()], [last()-N]) on XML documents with many same-tag siblings. El...

X Description: Element.findall() and fully-consumed Element.iterfind() exhibit O(n^2) time complexity when using XPath index predicates ([1], [last()], [last()-N]) on XML documents with many same-tag siblings. El...

Opengraph URL: https://github.com/python/cpython/issues/152674

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Quadratic behavior in xml.etree.ElementPath Index Predicates","articleBody":"`Element.findall()` and fully-consumed `Element.iterfind()` exhibit *O*(*n*^2) time complexity when using XPath index predicates (`[1]`, `[last()]`, `[last()-N]`) on XML documents with many same-tag siblings.\n`Element.find()` is only affected when the first match is near the end of the sibling list, such as with `[last()]` or `[last()-N]`; `.//item[1]` short-circuits after the first match.\n\n(reported privately by @DarkaMaul)\n\n\u003c!-- gh-linked-prs -->\n### Linked PRs\n* gh-152676\n* gh-154810\n* gh-154811\n* gh-154812\n* gh-154813\n* gh-154814\n* gh-154815\n\u003c!-- /gh-linked-prs -->\n","author":{"url":"https://github.com/encukou","@type":"Person","name":"encukou"},"datePublished":"2026-06-30T11:16:21Z","url":"https://github.com/python/cpython/issues/152674"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:a4b58451-792b-dc14-8d29-5d3fd8679ad3
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id8604:2EA4A8:6C05:916E:6AFDA7C3
html-safe-noncea7ad6ea56122784b3e291b589f414ac4e1a250798365136492ec6e8045d75f64
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4NjA0OjJFQTRBODo2QzA1OjkxNkU6NkFGREE3QzMiLCJ2aXNpdG9yX2lkIjoiODMyMjU5NTUyNjk4MTU2MDI1OSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac08337f8fdadc740e74e8e03d814c8558f5e83044ac82bffe71a8a178b3c37a37
hovercard-subject-tagissue:4776231246
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python/cpython/152674/issue_layout
twitter:imagehttps://opengraph.githubassets.com/4773c83ca2f549004d93bd821ae0d5c54c6956099b40597c596a864a973cf528/python/cpython/issues/152674
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/4773c83ca2f549004d93bd821ae0d5c54c6956099b40597c596a864a973cf528/python/cpython/issues/152674
og:image:altElement.findall() and fully-consumed Element.iterfind() exhibit O(n^2) time complexity when using XPath index predicates ([1], [last()], [last()-N]) on XML documents with many same-tag siblings. El...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameencukou
hostnamegithub.com
expected-hostnamegithub.com
Nonebc86424ef34a73b386237872800e922d149d65ba907f63d6f150a2dcb8433bea
turbo-cache-controlno-preview
go-importgithub.com/python/cpython git https://github.com/python/cpython.git
octolytics-dimension-user_id1525981
octolytics-dimension-user_loginpython
octolytics-dimension-repository_id81598961
octolytics-dimension-repository_nwopython/cpython
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id81598961
octolytics-dimension-repository_network_root_nwopython/cpython
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release0ddf53eb35c87f1f8df13dbf75c3bdadbfc6e969
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/python/cpython/issues/152674#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fissues%2F152674
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fissues%2F152674
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=python%2Fcpython
Reloadhttps://github.com/python/cpython/issues/152674
Reloadhttps://github.com/python/cpython/issues/152674
Reloadhttps://github.com/python/cpython/issues/152674
pythonhttps://github.com/python
cpythonhttps://github.com/python/cpython
Codehttps://github.com/python/cpython
Issues5k+ (5k+)https://github.com/python/cpython/issues
Pull requests2.4k (2.4k)https://github.com/python/cpython/pulls
Actionshttps://github.com/python/cpython/actions
Projectshttps://github.com/python/cpython/projects
Security and qualityhttps://github.com/python/cpython/security
Insightshttps://github.com/python/cpython/insights
https://github.com/python/cpython
New issuehttps://github.com/login?return_to=https://github.com/python/cpython/issues/152674
New issuehttps://github.com/login?return_to=https://github.com/python/cpython/issues/152674
Quadratic behavior in xml.etree.ElementPath Index Predicateshttps://github.com/python/cpython/issues/152674#top
https://github.com/encukou
stdlibStandard Library Python modules in the Lib/ directoryhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22stdlib%22
topic-XMLhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22topic-XML%22
type-securityA security issuehttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22type-security%22
https://github.com/encukou
encukouhttps://github.com/encukou
on Jun 30, 2026https://github.com/python/cpython/issues/152674#issue-4776231246
@DarkaMaulhttps://github.com/DarkaMaul
gh-152674: Avoid quadratic behavior in xml.etree.ElementPath index predicates #152676https://github.com/python/cpython/pull/152676
[3.14] gh-152674: Avoid quadratic behavior in xml.etree.ElementPath index predicates (GH-152676) #154810https://github.com/python/cpython/pull/154810
[3.13] gh-152674: Avoid quadratic behavior in xml.etree.ElementPath index predicates (GH-152676) #154811https://github.com/python/cpython/pull/154811
[3.15] gh-152674: Avoid quadratic behavior in xml.etree.ElementPath index predicates (GH-152676) #154812https://github.com/python/cpython/pull/154812
[3.11] gh-152674: Avoid quadratic behavior in xml.etree.ElementPath index predicates (GH-152676) #154813https://github.com/python/cpython/pull/154813
[3.10] gh-152674: Avoid quadratic behavior in xml.etree.ElementPath index predicates (GH-152676) #154814https://github.com/python/cpython/pull/154814
[3.12] gh-152674: Avoid quadratic behavior in xml.etree.ElementPath index predicates (GH-152676) #154815https://github.com/python/cpython/pull/154815
encukouhttps://github.com/encukou
on Jun 30, 2026https://github.com/python/cpython/issues/152674#event-27374895388
encukouhttps://github.com/encukou
type-securityA security issuehttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22type-security%22
stdlibStandard Library Python modules in the Lib/ directoryhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22stdlib%22
topic-XMLhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22topic-XML%22
on Jun 30, 2026https://github.com/python/cpython/issues/152674#event-27374895986
encukouhttps://github.com/encukou
on Jul 28, 2026https://github.com/python/cpython/issues/152674#event-28595043036
gh-152674: Avoid quadratic behavior in xml.etree.ElementPath index pr…https://github.com/python/cpython/commit/2ffab083782968a4d732738f4f1dff6bbd69d2b0
gh-152674https://github.com/python/cpython/issues/152674
2ffab08https://github.com/python/cpython/commit/2ffab083782968a4d732738f4f1dff6bbd69d2b0
[3.15] gh-152674: Avoid quadratic behavior in xml.etree.ElementPath i…https://github.com/python/cpython/commit/02c08e6b747ac43d0d866a4ffa916bedf3423f81
gh-152674https://github.com/python/cpython/issues/152674
02c08e6https://github.com/python/cpython/commit/02c08e6b747ac43d0d866a4ffa916bedf3423f81
[3.14] gh-152674: Avoid quadratic behavior in xml.etree.ElementPath i…https://github.com/python/cpython/commit/cb409342a19f25656f62e679f8bac265fe1442c3
gh-152674https://github.com/python/cpython/issues/152674
cb40934https://github.com/python/cpython/commit/cb409342a19f25656f62e679f8bac265fe1442c3
[3.13] gh-152674: Avoid quadratic behavior in xml.etree.ElementPath i…https://github.com/python/cpython/commit/390337b8ba1658833fdef379e1739c9f9533a8db
gh-152674https://github.com/python/cpython/issues/152674
390337bhttps://github.com/python/cpython/commit/390337b8ba1658833fdef379e1739c9f9533a8db
Yhg1shttps://github.com/Yhg1s
on Aug 4, 2026https://github.com/python/cpython/issues/152674#event-28939428290
[3.12] gh-152674: Avoid quadratic behavior in xml.etree.ElementPath i…https://github.com/python/cpython/commit/96510a3758f4a075f43223afdee3b6ee1a7a7f02
gh-152674https://github.com/python/cpython/issues/152674
96510a3https://github.com/python/cpython/commit/96510a3758f4a075f43223afdee3b6ee1a7a7f02
pablogsalhttps://github.com/pablogsal
on Aug 10, 2026https://github.com/python/cpython/issues/152674#event-29243750342
[3.11] gh-152674: Avoid quadratic behavior in xml.etree.ElementPath i…https://github.com/python/cpython/commit/0583f24ae678993e3f7939f51ad5bcae5ad9dc70
gh-152674https://github.com/python/cpython/issues/152674
0583f24https://github.com/python/cpython/commit/0583f24ae678993e3f7939f51ad5bcae5ad9dc70
[3.10] gh-152674: Avoid quadratic behavior in xml.etree.ElementPath i…https://github.com/python/cpython/commit/037965c00a427cba5c05447efadc67c51a492e85
gh-152674https://github.com/python/cpython/issues/152674
037965chttps://github.com/python/cpython/commit/037965c00a427cba5c05447efadc67c51a492e85
encukouhttps://github.com/encukou
completedhttps://github.com/python/cpython/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
on Aug 11, 2026https://github.com/python/cpython/issues/152674#event-29281348388
mbeijenhttps://github.com/mbeijen
on Aug 14, 2026https://github.com/python/cpython/issues/152674#event-29455493618
pythongh-152674: Avoid quadratic behavior in xml.etree.ElementPath in…https://github.com/mbeijen/cpython/commit/1d1d8e185a031f3c917f9c3557e06837890c15e3
pythongh-152674https://github.com/python/cpython/issues/152674
1d1d8e1https://github.com/mbeijen/cpython/commit/1d1d8e185a031f3c917f9c3557e06837890c15e3
arnouthttps://github.com/arnout
on Aug 14, 2026https://github.com/python/cpython/issues/152674#event-29459784427
package/python3: security bump to v3.12.14https://github.com/buildroot/buildroot/commit/80251a06cf88d47385afd74e5e25f68f93bccca7
80251a0https://github.com/buildroot/buildroot/commit/80251a06cf88d47385afd74e5e25f68f93bccca7
icanhasmathhttps://github.com/icanhasmath
on Oct 28, 2026https://github.com/python/cpython/issues/152674#event-34496624306
[3.10] pythongh-152674: Avoid quadratic behavior in xml.etree.Element…https://github.com/ActiveState/cpython/commit/cc4db8cbf6140928d613c81cd51a321d6a5cccf9
pythongh-152674https://github.com/python/cpython/issues/152674
cc4db8chttps://github.com/ActiveState/cpython/commit/cc4db8cbf6140928d613c81cd51a321d6a5cccf9
Sign up for freehttps://github.com/signup?return_to=https://github.com/python/cpython/issues/152674
Sign in to commenthttps://github.com/login?return_to=https://github.com/python/cpython/issues/152674
encukouhttps://github.com/encukou
stdlibStandard Library Python modules in the Lib/ directoryhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22stdlib%22
topic-XMLhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22topic-XML%22
type-securityA security issuehttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22type-security%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.