iTwin / imodel-native

Apache License 2.0
20 stars 12 forks source link

Add async versions of exportGraphics and exportPartGraphics #196

Open dassaf4 opened 1 year ago

dassaf4 commented 1 year ago

Requested to improve performance for Civil tools.

Copied from ADO #796962

dassaf4 commented 1 year ago

IModelDb.exportGraphics calls into the backend's JSInterop::ExportGraphics, which already spawns a thread per element passed in. Matt was meticulous designing it for performance. Multithreading the other one may be prohibitively hard, but there could be other ways to improve its performance. @simnorm can you confirm you seek improved performance only for exportPartGraphics?

bsy-nicholasw commented 1 year ago

Hi @dassaf4, this request was to less about making the internals more performant and for the exportGraphics call to return a Promise so the backend doesn't block and wait for the result. Similar to generateElementGraphics https://www.itwinjs.org/reference/core-backend/imodels/imodeldb/generateelementgraphics/