-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
exportGraphics should support instancing for symbols inside 3d linestyles #195
Comments
Hi @dassaf4, I currently have an issue in my hands where the civil backend consumes too much memory and end up crashing the application on mobile. After a bit of investigation, it is caused by 3d linestyles that output many large meshes. The first one I got a hold of outputs 742 meshes with 30k faces each. Just keeping those meshes in memory drains a bunch of resources, and you can imagine processing those is extremely costly. Would it be possible to give this issue a high priority? It has been reported in a service case by a user (ADO#1450752). As a temporary workaround, I'll either skip elements with linestyles (by inspecting GeometryStream prior to calling exportGraphics). Dataset(s) are available in the civil work item linked to the service case on ADO. Let me know if I can help. Thanks! |
Hi @a-gagnon, I'll take a look in the new year. At this point, I have no idea how to approach a solution. It seems that Matt was aware of the problem, with these comments in JsInteropExportGraphics.cpp. @bbastings any pointers for implementing this? In the meantime, is it possible to strip the 3d linestyle so you at least get the mesh geometry? |
If ExportGraphicsBuilder._WantStrokeLineStyle returns false it won't spew the linestyle geometry, which it currently does for non-cosmetic/physical styles. |
Yeah, it's the symbols being exploded. I'm not sure what it would take for export graphics to return 1 mesh with transforms. Currently the linestyle stroke code does not output the parts as symbols. It could only do this when not using color/weight overrides or clipping. I tried instancing when possible once, it was MUCH slower for tile generation because it didn't instance and ended up exploding them anyway...this bypassed the automatic instancing of identical solid primitive/meshes that normally happens making performance significantly worse. Not sure whether anything has changed there... So, could be that having export graphics take a similar approach to tile generation and post instance the symbol geometry to not collect such a huge amount of individual meshes would be an option. Found my code change that tried to output symbols that could be instanced...I'll include it in case someone on the display team wants to revisit this. :)
|
As for controlling the linestyle symbol export from typescript. I only see this option...have you tried setting a size?
This is how that value is checked/used:
|
I couldn't find It's obvious that it'll help the guardrail case, but I have no idea what users might throw at us. A few years back, we had a fire hydrant with roughly 100k facets, and that threshold wouldn't have filtered it out... From my standpoint, the ideal solution would be to add a flag to the ExportGraphicsOptions while passing the |
I don't disagree, but like I mentioned, that requires the changes to the line style stroke code posted previously and sorting out its issues. For now, setting a very large size to skip stroking all line styles has to be better than skipping the entire element? |
Yeah, I can look into that. Thanks. |
@a-gagnon @dassaf4 I created a branch that may help address this. This should let ExportGraphics accumulate linestyles symbols as parts when part instances are requested (assuming I've understood the ExportGraphics code correctly). If part information isn't requested symbols will continue to be exploded to geometry. I don't think we need another option to control this, not sure why you would want parts and not want symbols treated as part when possible. From what I've seen with guardrail 3d linestyles the past, the symbols aren't clipped and they aren't ignoring color or weight, so they should be acceptable for the instancing check I added. I'll leave it to you folks to figure out how to test this. A few things that should be investigated regardless. Are the facet tolerances reasonable, are the tolerances properly accounting for a part scale? Those facet counts seem excessive for a bolt. If the tolerances are okay, is some sort of decimation warranted then? |
Requested to improve performance for Civil tools.
Copied from ADO #796961
The text was updated successfully, but these errors were encountered: