René's URL Explorer Experiment


Title: ifc5d.quantify: lookup entity names directly; index into dict rather than iterate in simple cases by aothms · Pull Request #7126 · IfcOpenShell/IfcOpenShell · GitHub

Open Graph Title: ifc5d.quantify: lookup entity names directly; index into dict rather than iterate in simple cases by aothms · Pull Request #7126 · IfcOpenShell/IfcOpenShell

X Title: ifc5d.quantify: lookup entity names directly; index into dict rather than iterate in simple cases by aothms · Pull Request #7126 · IfcOpenShell/IfcOpenShell

Description: See here my call tree (from pyinstrument). A lot of time being spent in selector.py so I looked for some ways to reduce time spent there: use by_type in simple entity type names use type of elements as an index into the list (especially useful when list of elements is tiny). 4.186 _run_module_code runpy.py:89 └─ 4.186 _run_code runpy.py:63 └─ 4.186 primitive_objects.py:1 └─ 4.138 Element.build primitive_objects.py:106 └─ 4.138 Element._build primitive_objects.py:327 ├─ 3.805 primitive_objects.py:346 │ ├─ 2.904 Translate.build primitive_objects.py:390 │ │ ├─ 2.435 Boolean.build primitive_objects.py:490 │ │ │ ├─ 1.849 primitive_objects.py:492 │ │ │ │ ├─ 1.289 Translate.build primitive_objects.py:390 │ │ │ │ │ └─ 1.279 Element.build primitive_objects.py:106 │ │ │ │ │ └─ 1.278 Element._build primitive_objects.py:327 │ │ │ │ │ └─ 1.263 quantify ifc5d\qto.py:61 │ │ │ │ │ ├─ 1.107 filter_elements ifcopenshell\util\selector.py:425 │ │ │ │ │ │ [19 frames hidden] lark │ │ │ │ │ └─ 0.152 IfcOpenShell.calculate ifc5d\qto.py:259 │ │ │ │ │ └─ 0.149 iterator.initialize ifcopenshell\ifcopenshell_wrapper.py:1097 │ │ │ │ │ └─ 0.149 Iterator_initialize │ │ │ │ └─ 0.560 Element.build primitive_objects.py:106 │ │ │ │ └─ 0.560 Element._build primitive_objects.py:327 │ │ │ │ └─ 0.551 quantify ifc5d\qto.py:61 │ │ │ │ ├─ 0.455 filter_elements ifcopenshell\util\selector.py:425 │ │ │ │ │ [6 frames hidden] lark │ │ │ │ └─ 0.095 IfcOpenShell.calculate ifc5d\qto.py:259 │ │ │ │ └─ 0.093 iterator.initialize ifcopenshell\ifcopenshell_wrapper.py:1097 │ │ │ │ └─ 0.093 Iterator_initialize │ │ │ └─ 0.575 quantify ifc5d\qto.py:61 │ │ │ ├─ 0.452 filter_elements ifcopenshell\util\selector.py:425 │ │ │ │ [6 frames hidden] lark │ │ │ └─ 0.123 IfcOpenShell.calculate ifc5d\qto.py:259 │ │ │ └─ 0.121 iterator.initialize ifcopenshell\ifcopenshell_wrapper.py:1097 │ │ │ └─ 0.121 Iterator_initialize │ │ └─ 0.386 Element.build primitive_objects.py:106 │ │ └─ 0.386 Element._build primitive_objects.py:327 │ │ └─ 0.381 quantify ifc5d\qto.py:61 │ │ ├─ 0.305 filter_elements ifcopenshell\util\selector.py:425 │ │ │ [5 frames hidden] lark │ │ └─ 0.075 IfcOpenShell.calculate ifc5d\qto.py:259 │ │ └─ 0.075 iterator.initialize ifcopenshell\ifcopenshell_wrapper.py:1097 │ │ └─ 0.075 Iterator_initialize │ └─ 0.901 Element.build primitive_objects.py:106 │ └─ 0.901 Element._build primitive_objects.py:327 │ ├─ 0.532 quantify ifc5d\qto.py:61 │ │ ├─ 0.455 filter_elements ifcopenshell\util\selector.py:425 │ │ │ [7 frames hidden] lark │ │ └─ 0.076 IfcOpenShell.calculate ifc5d\qto.py:259 │ │ └─ 0.073 iterator.initialize ifcopenshell\ifcopenshell_wrapper.py:1097 │ │ └─ 0.073 Iterator_initialize │ └─ 0.351 primitive_objects.py:346 │ └─ 0.351 Element.build primitive_objects.py:106 │ └─ 0.351 Element._build primitive_objects.py:327 │ │ [5 frames hidden] lark │ └─ 0.153 edit_qtos ifc5d\qto.py:83 │ └─ 0.152 wrapper ifcopenshell\api\__init__.py:261 │ [8 frames hidden] ifcopenshell, ├─ 0.173 wrapper ifcopenshell\api\__init__.py:261 │ [3 frames hidden] ifcopenshell └─ 0.158 primitive_objects.py:363 └─ 0.158 Element.build primitive_objects.py:106 └─ 0.158 Element._build primitive_objects.py:327 └─ 0.154 quantify ifc5d\qto.py:61 └─ 0.154 filter_elements ifcopenshell\util\selector.py:425 [5 frames hidden] lark

Open Graph Description: See here my call tree (from pyinstrument). A lot of time being spent in selector.py so I looked for some ways to reduce time spent there: use by_type in simple entity type names use type of elemen...

X Description: See here my call tree (from pyinstrument). A lot of time being spent in selector.py so I looked for some ways to reduce time spent there: use by_type in simple entity type names use type of elemen...

Opengraph URL: https://github.com/IfcOpenShell/IfcOpenShell/pull/7126

X: @github

direct link

Domain: github.com

IPv4 address: 140.82.112.3

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/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:f5694425-bf25-0294-5f6a-d5999a038314
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idA38E:34CDC:19F617:22833B:6B04CC88
html-safe-nonce8f022fddac8916536dfb3cafad746904501b1e444ba8eac27ee447c0f6007837
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBMzhFOjM0Q0RDOjE5RjYxNzoyMjgzM0I6NkIwNENDODgiLCJ2aXNpdG9yX2lkIjoiMjgyNTc1NTIyMzE2NjA3ODA4OCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmacf282cb048e0b3d293b0aacbca1f5a260853b1e78d4b302b9c64d1207adcdeb4a
hovercard-subject-tagpull_request:2826684580
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/IfcOpenShell/IfcOpenShell/pull/7126/files
twitter:imagehttps://avatars.githubusercontent.com/u/1096535?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/1096535?s=400&v=4
og:image:altSee here my call tree (from pyinstrument). A lot of time being spent in selector.py so I looked for some ways to reduce time spent there: use by_type in simple entity type names use type of elemen...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None27ed421e5c2dac040a37529b5b9191edcc4a3de70521471e81fb4b4d9dc2aa7d
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/IfcOpenShell/IfcOpenShell git https://github.com/IfcOpenShell/IfcOpenShell.git
octolytics-dimension-user_id13692563
octolytics-dimension-user_loginIfcOpenShell
octolytics-dimension-repository_id40473201
octolytics-dimension-repository_nwoIfcOpenShell/IfcOpenShell
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id40473201
octolytics-dimension-repository_network_root_nwoIfcOpenShell/IfcOpenShell
turbo-body-classeslogged-out env-production page-responsive
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release63dc19014c621c67306d7899c04c78dcd0d95803
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/IfcOpenShell/IfcOpenShell/pull/7126/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FIfcOpenShell%2FIfcOpenShell%2Fpull%2F7126%2Ffiles
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%2FIfcOpenShell%2FIfcOpenShell%2Fpull%2F7126%2Ffiles
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=IfcOpenShell%2FIfcOpenShell
Reloadhttps://github.com/IfcOpenShell/IfcOpenShell/pull/7126/files
Reloadhttps://github.com/IfcOpenShell/IfcOpenShell/pull/7126/files
Reloadhttps://github.com/IfcOpenShell/IfcOpenShell/pull/7126/files
IfcOpenShellhttps://github.com/IfcOpenShell
IfcOpenShellhttps://github.com/IfcOpenShell/IfcOpenShell
Codehttps://github.com/IfcOpenShell/IfcOpenShell
Issues1.2k (1.2k)https://github.com/IfcOpenShell/IfcOpenShell/issues
Pull requests937 (937)https://github.com/IfcOpenShell/IfcOpenShell/pulls
Discussionshttps://github.com/IfcOpenShell/IfcOpenShell/discussions
Actionshttps://github.com/IfcOpenShell/IfcOpenShell/actions
Projectshttps://github.com/IfcOpenShell/IfcOpenShell/projects
Wikihttps://github.com/IfcOpenShell/IfcOpenShell/wiki
Security and qualityhttps://github.com/IfcOpenShell/IfcOpenShell/security
Insightshttps://github.com/IfcOpenShell/IfcOpenShell/insights
Sign up for GitHub https://github.com/signup?return_to=%2FIfcOpenShell%2FIfcOpenShell%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2FIfcOpenShell%2FIfcOpenShell%2Fissues%2Fnew%2Fchoose
aothmshttps://github.com/aothms
v0.8.0https://github.com/IfcOpenShell/IfcOpenShell/tree/v0.8.0
tfk-less-lark-in-quantifyhttps://github.com/IfcOpenShell/IfcOpenShell/tree/tfk-less-lark-in-quantify
Conversation 4 https://github.com/IfcOpenShell/IfcOpenShell/pull/7126
Commits 1 https://github.com/IfcOpenShell/IfcOpenShell/pull/7126/commits
Checks 0 https://github.com/IfcOpenShell/IfcOpenShell/pull/7126/checks
Files changed https://github.com/IfcOpenShell/IfcOpenShell/pull/7126/files
Please reload this pagehttps://github.com/IfcOpenShell/IfcOpenShell/pull/7126/files
ifc5d.quantify: lookup entity names directly; index into dict rather than iterate in simple cases https://github.com/IfcOpenShell/IfcOpenShell/pull/7126/files#top
Show all changes 1 commit https://github.com/IfcOpenShell/IfcOpenShell/pull/7126/files
e08af55 ifc5d.quantify: lookup entity names directly; index into dict rather … aothms Sep 14, 2025 https://github.com/IfcOpenShell/IfcOpenShell/pull/7126/commits/e08af55c5a6e3c85ae6fee86e98da065f0093009
Clear filters https://github.com/IfcOpenShell/IfcOpenShell/pull/7126/files
Please reload this pagehttps://github.com/IfcOpenShell/IfcOpenShell/pull/7126/files
Please reload this pagehttps://github.com/IfcOpenShell/IfcOpenShell/pull/7126/files
src/ifc5d/ifc5d/qto.pyhttps://github.com/IfcOpenShell/IfcOpenShell/pull/7126/files#diff-bda277e494962c2000817e456c486889bf4086fd0f7e5ff3b5abe746ba3c1723
View file https://github.com/IfcOpenShell/IfcOpenShell/blob/e08af55c5a6e3c85ae6fee86e98da065f0093009/src/ifc5d/ifc5d/qto.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/IfcOpenShell/IfcOpenShell/pull/7126/{{ revealButtonHref }}
https://github.com/IfcOpenShell/IfcOpenShell/pull/7126/files#diff-bda277e494962c2000817e456c486889bf4086fd0f7e5ff3b5abe746ba3c1723
https://github.com/IfcOpenShell/IfcOpenShell/pull/7126/files#diff-bda277e494962c2000817e456c486889bf4086fd0f7e5ff3b5abe746ba3c1723
https://github.com/IfcOpenShell/IfcOpenShell/pull/7126/files#diff-bda277e494962c2000817e456c486889bf4086fd0f7e5ff3b5abe746ba3c1723
https://github.com/IfcOpenShell/IfcOpenShell/pull/7126/files#diff-bda277e494962c2000817e456c486889bf4086fd0f7e5ff3b5abe746ba3c1723
https://github.com/IfcOpenShell/IfcOpenShell/pull/7126/files#diff-bda277e494962c2000817e456c486889bf4086fd0f7e5ff3b5abe746ba3c1723
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

Response headers:
Servergithub.com
Content-Typetext/html; charset=utf-8
Cache-Controlno-cache

Viewport: width=device-width


URLs of crawlers that visited me.