Title: ExtractElements is extremely slow for a 9,289-element selection in an IFC2X3 MEP model · Issue #9247 · IfcOpenShell/IfcOpenShell · GitHub
Open Graph Title: ExtractElements is extremely slow for a 9,289-element selection in an IFC2X3 MEP model · Issue #9247 · IfcOpenShell/IfcOpenShell
X Title: ExtractElements is extremely slow for a 9,289-element selection in an IFC2X3 MEP model · Issue #9247 · IfcOpenShell/IfcOpenShell
Description: Bug Description ExtractElements is extremely slow for a 9,289-element selection in an IFC2X3 MEP modelBug DescriptionExtractElements takes an extremely long time when extracting all elements from two building storeys in an IFC2X3 MEP mod...
Open Graph Description: Bug Description ExtractElements is extremely slow for a 9,289-element selection in an IFC2X3 MEP modelBug DescriptionExtractElements takes an extremely long time when extracting all elements from t...
X Description: Bug Description ExtractElements is extremely slow for a 9,289-element selection in an IFC2X3 MEP modelBug DescriptionExtractElements takes an extremely long time when extracting all elements from t...
Opengraph URL: https://github.com/IfcOpenShell/IfcOpenShell/issues/9247
X: @github
Domain: github.com
IPv4 address: 140.82.114.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"ExtractElements is extremely slow for a 9,289-element selection in an IFC2X3 MEP model","articleBody":"### Bug Description\n\n\u003chtml>\n\u003cbody>\n\u003c!--StartFragment-->\u003chtml>\u003chead>\u003c/head>\u003cbody>\u003ch1>ExtractElements is extremely slow for a 9,289-element selection in an IFC2X3 MEP model\u003c/h1>\u003ch3>Bug Description\u003c/h3>\u003cp>\u003ccode inline=\"\">ExtractElements\u003c/code> takes an extremely long time when extracting all elements from two building storeys in an IFC2X3 MEP model.\u003c/p>\u003cp>The recipe successfully matched \u003cstrong>9,289 elements\u003c/strong>, but progress became extremely slow during the extraction.\u003c/p>\u003cp>According to the log timestamps, after approximately \u003cstrong>35 minutes\u003c/strong>, only \u003cstrong>828 of 9,289 elements\u003c/strong> had been extracted, which is approximately \u003cstrong>8.9%\u003c/strong> of the selection.\u003c/p>\u003cp>The process continued running for more than \u003cstrong>45 minutes\u003c/strong> without completing and without producing an output file or raising an exception.\u003c/p>\u003cp>This may be related to #8945, but this test uses:\u003c/p>\u003cul>\u003cli>\u003cp>A different IFC model\u003c/p>\u003c/li>\u003cli>\u003cp>An MEP model rather than an architectural model\u003c/p>\u003c/li>\u003cli>\u003cp>A much larger, mixed selection of element classes\u003c/p>\u003c/li>\u003cli>\u003cp>The latest available BonsaiPR build\u003c/p>\u003c/li>\u003cli>\u003cp>An IFC2X3 model that generates several warnings while element types are appended\u003c/p>\u003c/li>\u003c/ul>\u003ch3>Test Model\u003c/h3>\u003cp>The test model can be downloaded here:\u003c/p>\u003cp>\u003ca href=\"https://acc.autodesk.eu/build/share/projects/02c1a9be-fec0-47dc-b47e-12a54ee7dc34/files?shareId=9291b706-712b-4df4-9bc0-76cf0e940140\">https://acc.autodesk.eu/build/share/projects/02c1a9be-fec0-47dc-b47e-12a54ee7dc34/files?shareId=9291b706-712b-4df4-9bc0-76cf0e940140\u003c/a>\u003c/p>\u003ch3>Environment\u003c/h3>\u003cpre>\u003ccode class=\"language-text\">Bonsai version: BonsaiPR v0.8.6-alpha260804\nBonsai commit: 169afdc\nModel discipline: MEP\nIFC schema: IFC2X3\nRecipe: ExtractElements\nMatched elements: 9,289\n\u003c/code>\u003c/pre>\u003ch3>Selection\u003c/h3>\u003cp>All elements assigned to the following two building storeys were selected:\u003c/p>\u003cpre>\u003ccode class=\"language-text\">Bouwlaag 06 Verdieping 04\nBouwlaag 07 Verdieping 05\n\u003c/code>\u003c/pre>\u003cp>The selection contains multiple MEP element classes rather than a single IFC class or element type.\u003c/p>\u003ch3>Steps to Reproduce\u003c/h3>\u003col>\u003cli>\u003cp>Open the linked IFC2X3 MEP model in Bonsai.\u003c/p>\u003c/li>\u003cli>\u003cp>Select all elements contained in:\u003c/p>\u003cul>\u003cli>\u003cp>\u003ccode inline=\"\">Bouwlaag 06 Verdieping 04\u003c/code>\u003c/p>\u003c/li>\u003cli>\u003cp>\u003ccode inline=\"\">Bouwlaag 07 Verdieping 05\u003c/code>\u003c/p>\u003c/li>\u003c/ul>\u003c/li>\u003cli>\u003cp>Open the IfcPatch interface.\u003c/p>\u003c/li>\u003cli>\u003cp>Select the \u003ccode inline=\"\">ExtractElements\u003c/code> recipe.\u003c/p>\u003c/li>\u003cli>\u003cp>Use the current selection as the elements to extract.\u003c/p>\u003c/li>\u003cli>\u003cp>Select an output IFC file.\u003c/p>\u003c/li>\u003cli>\u003cp>Execute the patch.\u003c/p>\u003c/li>\u003cli>\u003cp>Observe the extraction progress in the system console.\u003c/p>\u003c/li>\u003c/ol>\u003ch3>Actual Behaviour\u003c/h3>\u003cp>\u003ccode inline=\"\">ExtractElements\u003c/code> correctly identifies the selection:\u003c/p>\u003cpre>\u003ccode class=\"language-text\">ExtractElements: matched 9289 element(s), extracting...\n\u003c/code>\u003c/pre>\u003cp>However, the extraction then progresses extremely slowly.\u003c/p>\u003cp>The recorded progress was:\u003c/p>\nTimestamp | Extracted | Percentage\n-- | -- | --\n11:28:18 | 0 / 9,289 | 0%\n11:28:46 | 92 / 9,289 | 1.0%\n11:52:17 | 184 / 9,289 | 2.0%\n11:53:54 | 276 / 9,289 | 3.0%\n11:54:52 | 368 / 9,289 | 4.0%\n11:57:38 | 460 / 9,289 | 5.0%\n11:58:56 | 552 / 9,289 | 5.9%\n12:00:12 | 644 / 9,289 | 6.9%\n12:02:00 | 736 / 9,289 | 7.9%\n12:03:14 | 828 / 9,289 | 8.9%\n\n\u003cp>Based on the timestamps, extracting the first 828 elements took approximately \u003cstrong>34 minutes and 56 seconds\u003c/strong>.\u003c/p>\u003cp>The process was still running after more than \u003cstrong>45 minutes\u003c/strong> and had not produced a completed output file.\u003c/p>\u003cp>No fatal exception was shown.\u003c/p>\u003ch3>Expected Behaviour\u003c/h3>\u003cp>\u003ccode inline=\"\">ExtractElements\u003c/code> should extract the selected elements within a reasonable and predictable amount of time.\u003c/p>\u003cp>For a large selection, longer processing may be expected, but the extraction should not appear to stall or require several hours to process a selection of approximately 9,000 elements.\u003c/p>\u003cp>If one or more malformed relationships or incompatible IFC2X3 element-type assignments are responsible for the slowdown, the recipe should ideally:\u003c/p>\u003cul>\u003cli>\u003cp>Identify the affected entity\u003c/p>\u003c/li>\u003cli>\u003cp>Skip or handle the invalid assignment efficiently\u003c/p>\u003c/li>\u003cli>\u003cp>Continue without repeatedly performing expensive operations\u003c/p>\u003c/li>\u003cli>\u003cp>Provide a clear warning without significantly delaying the entire extraction\u003c/p>\u003c/li>\u003c/ul>\u003ch3>Additional Observations\u003c/h3>\u003cp>Several warnings are generated during extraction.\u003c/p>\u003cp>Examples include:\u003c/p>\u003cpre>\u003ccode class=\"language-text\">Warning: append_asset could not type IfcElectricDistributionPoint\nwith IfcDistributionElementType (GlobalId collision?):\nIfcDistributionElementType cannot type IfcElectricDistributionPoint\nin schema IFC2X3\n(allowed occurrence classes: IfcDistributionElement)\n\u003c/code>\u003c/pre>\u003cp>and:\u003c/p>\u003cpre>\u003ccode class=\"language-text\">Warning: append_asset could not type IfcFlowTerminal\nwith IfcDistributionElementType (GlobalId collision?):\nIfcDistributionElementType cannot type IfcFlowTerminal\nin schema IFC2X3\n(allowed occurrence classes: IfcDistributionElement)\n\u003c/code>\u003c/pre>\u003cp>It is currently unclear whether these warnings are directly responsible for the long extraction time.\u003c/p>\u003cp>However, they occur between extraction progress updates and may indicate that \u003ccode inline=\"\">append_asset\u003c/code> is repeatedly attempting to recreate incompatible IFC2X3 type assignments.\u003c/p>\u003cp>The affected entity classes observed in the log include:\u003c/p>\u003cul>\u003cli>\u003cp>\u003ccode inline=\"\">IfcElectricDistributionPoint\u003c/code>\u003c/p>\u003c/li>\u003cli>\u003cp>\u003ccode inline=\"\">IfcFlowTerminal\u003c/code>\u003c/p>\u003c/li>\u003cli>\u003cp>\u003ccode inline=\"\">IfcDistributionElementType\u003c/code>\u003c/p>\u003c/li>\u003c/ul>\u003ch3>Full Log\u003c/h3>\u003cpre>\u003ccode class=\"language-text\">[IfcPatch] ExtractElements: matched 9289 element(s), extracting...\n2026-08-04:11:28:18,731 INFO [ExtractElements.py:107] ExtractElements: matched 9289 element(s), extracting...\n\n[IfcPatch] ExtractElements: extracted 92/9289 element(s)\n2026-08-04:11:28:46,106 INFO [ExtractElements.py:112] ExtractElements: extracted 92/9289 element(s)\n\n[IfcPatch] ExtractElements: extracted 184/9289 element(s)\n2026-08-04:11:52:17,802 INFO [ExtractElements.py:112] ExtractElements: extracted 184/9289 element(s)\n\n[IfcPatch] ExtractElements: extracted 276/9289 element(s)\n2026-08-04:11:53:54,603 INFO [ExtractElements.py:112] ExtractElements: extracted 276/9289 element(s)\n\nWarning: append_asset could not type IfcElectricDistributionPoint #1775915 with IfcDistributionElementType (GlobalId collision?): IfcDistributionElementType cannot type IfcElectricDistributionPoint in schema IFC2X3 (allowed occurrence classes: IfcDistributionElement)\n\nWarning: append_asset could not type IfcElectricDistributionPoint #1788271 with IfcDistributionElementType (GlobalId collision?): IfcDistributionElementType cannot type IfcElectricDistributionPoint in schema IFC2X3 (allowed occurrence classes: IfcDistributionElement)\n\n[IfcPatch] ExtractElements: extracted 368/9289 element(s)\n2026-08-04:11:54:52,733 INFO [ExtractElements.py:112] ExtractElements: extracted 368/9289 element(s)\n\nWarning: append_asset could not type IfcElectricDistributionPoint #1789561 with IfcDistributionElementType (GlobalId collision?): IfcDistributionElementType cannot type IfcElectricDistributionPoint in schema IFC2X3 (allowed occurrence classes: IfcDistributionElement)\n\nWarning: append_asset could not type IfcFlowTerminal #1803565 with IfcDistributionElementType (GlobalId collision?): IfcDistributionElementType cannot type IfcFlowTerminal in schema IFC2X3 (allowed occurrence classes: IfcDistributionElement)\n\n[IfcPatch] ExtractElements: extracted 460/9289 element(s)\n2026-08-04:11:57:38,631 INFO [ExtractElements.py:112] ExtractElements: extracted 460/9289 element(s)\n\nWarning: append_asset could not type IfcFlowTerminal #1856720 with IfcDistributionElementType (GlobalId collision?): IfcDistributionElementType cannot type IfcFlowTerminal in schema IFC2X3 (allowed occurrence classes: IfcDistributionElement)\n\n[IfcPatch] ExtractElements: extracted 552/9289 element(s)\n2026-08-04:11:58:56,056 INFO [ExtractElements.py:112] ExtractElements: extracted 552/9289 element(s)\n\n[IfcPatch] ExtractElements: extracted 644/9289 element(s)\n2026-08-04:12:00:12,586 INFO [ExtractElements.py:112] ExtractElements: extracted 644/9289 element(s)\n\n[IfcPatch] ExtractElements: extracted 736/9289 element(s)\n2026-08-04:12:02:00,260 INFO [ExtractElements.py:112] ExtractElements: extracted 736/9289 element(s)\n\nWarning: append_asset could not type IfcFlowTerminal #2001704 with IfcDistributionElementType (GlobalId collision?): IfcDistributionElementType cannot type IfcFlowTerminal in schema IFC2X3 (allowed occurrence classes: IfcDistributionElement)\n\n[IfcPatch] ExtractElements: extracted 828/9289 element(s)\n2026-08-04:12:03:14,658 INFO [ExtractElements.py:112] ExtractElements: extracted 828/9289 element(s)\n\u003c/code>\u003c/pre>\u003ch3>Attachments\u003c/h3>\u003cp>The complete test model is available through the Autodesk Construction Cloud share link above.\u003c/p>\u003c/body>\u003c/html>\u003c!--EndFragment-->\n\u003c/body>\n\u003c/html>\n\n### Attachments\n\n_No response_\n\n### Debug and Error Output\n\n```true\n\n```","author":{"url":"https://github.com/PahlawanJoey","@type":"Person","name":"PahlawanJoey"},"datePublished":"2026-08-04T10:27:04Z","url":"https://github.com/IfcOpenShell/IfcOpenShell/issues/9247"}
| react-profiling | 0 |
| react-import-map | react,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-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:1b91d2cb-fe1f-787d-e176-e014e2237831 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B544:2D0B15:6DF15D:969C79:6B047805 |
| html-safe-nonce | 2fd0e06e6509b490b85e32fb112c2e85f88bf89ec4ac25f91ca6e3061b4ac345 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCNTQ0OjJEMEIxNTo2REYxNUQ6OTY5Qzc5OjZCMDQ3ODA1IiwidmlzaXRvcl9pZCI6IjkwNzI0MDM1NzYzOTc4MDM1OCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 8181e4a8b826cb7406425cd280cd4f25fd8e6b70a020413c37a38b00a496f43e |
| hovercard-subject-tag | issue:5059372524 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/IfcOpenShell/IfcOpenShell/9247/issue_layout |
| twitter:image | https://opengraph.githubassets.com/3111c6a085a30f8fb7136a234bcbcfe35d91a4d3cd16a4cc89d00114ad67a4e5/IfcOpenShell/IfcOpenShell/issues/9247 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/3111c6a085a30f8fb7136a234bcbcfe35d91a4d3cd16a4cc89d00114ad67a4e5/IfcOpenShell/IfcOpenShell/issues/9247 |
| og:image:alt | Bug Description ExtractElements is extremely slow for a 9,289-element selection in an IFC2X3 MEP modelBug DescriptionExtractElements takes an extremely long time when extracting all elements from t... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | PahlawanJoey |
| hostname | github.com |
| expected-hostname | github.com |
| None | 9c099f1b85def81ca352464c276510dfef32deaf3c305404e65b8d270284a58b |
| turbo-cache-control | no-preview |
| go-import | github.com/IfcOpenShell/IfcOpenShell git https://github.com/IfcOpenShell/IfcOpenShell.git |
| octolytics-dimension-user_id | 13692563 |
| octolytics-dimension-user_login | IfcOpenShell |
| octolytics-dimension-repository_id | 40473201 |
| octolytics-dimension-repository_nwo | IfcOpenShell/IfcOpenShell |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 40473201 |
| octolytics-dimension-repository_network_root_nwo | IfcOpenShell/IfcOpenShell |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | cf73f57448d52b3a7b619195e182b33d3b3454ca |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width