web-ifc-three
web-ifc-three copied to clipboard
ifcModel.ifcManager.getPropertySets(...) slow
I have a fairly large model (cca. 15MB), that is loaded in a few seconds, but calling model.ifcManager.getPropertySets(...) is very slow (100-150ms) for each IFC element. Other getters, like getItemProperties or getAllItemsOfType respond in a few milliseconds.
import { IFCLoader } from 'web-ifc-three/IFCLoader'
import { IFCWALL } from 'web-ifc'
const ifcLoader = new IFCLoader()
await ifcLoader.ifcManager.setWasmPath('')
const ifcModel = await ifcLoader.loadAsync(ifcURL)
console.time('getAllItemsOfType')
const walls = await ifcModel.ifcManager.getAllItemsOfType(0, IFCWALL, true)
console.timeEnd('getAllItemsOfType')
const ifcElement = walls[0]
console.time('getItemProperties')
const ipemProps = await ifcModel.ifcManager.getItemProperties(0, ifcElement.expressID, false)
console.timeEnd('getItemProperties')
console.time('getPropSets')
const propSets = await ifcModel.ifcManager.getPropertySets(0, ifcElement.expressID, false)
console.timeEnd('getPropSets')
output:
getAllItemsOfType: 10ms - timer ended
getItemProperties: 1ms - timer ended
getPropSets: 100ms - timer ended
Link to the model: https://drive.google.com/file/d/1eFqOh0TX7FmuYG5Zys1l61VtjAfFW4um/view?usp=sharing
I would like to process the whole IFC model and transform it to a structure that I can analyse easily. But the transformation takes too long time for the model above as the getPropertySets function is called for each element in the model.
Am I doing something wrong?
Hi,
same problem here, but my model is just 2mb. Any updates on this?
I am using library latest version 0.0.121.
I have tested also with older versions (till 0.0.100). Same problem: up to 70 ms to for a single call to getPropertySets.
The version included in threejs is a lot faster.
::take
🟢🟢🟢
::take
Hi, @aka-blackboots! Thanks for taking this bounty! The due date is December 19, 2022 UTC.
If you need to submit some pull requests (PR) to complete the tasks, make sure that the last and only the last PR has a title that either starts with the bounty ID or is exactly the same as the bounty name. After the PR is merged, this bounty’s status will automatically changed to done.
If you do not need to make a PR, tell the manager @agviegas to run ::done command after your tasks is confirmed to be done.
Good luck!
::drop
🟢🟢🟢
::drop
Hi, @aka-blackboots! Thanks for giving it a try! It’s now once again available for anyone to take.