trimesh
trimesh copied to clipboard
trimesh's usage of NetworkX: API usage and slowdowns
Hi. I would like to understand what parts of trimesh depend on algorithms from Networkx. What nx API calls it uses the most, for what purposes, and if you've ever experienced any slowdowns when scaling up graph sizes?
I did a quick search for previous issues related to NetworkX Usage, but I was wondering if you had any more insight into this topic. Thank you
Hey, actually connected components are used a lot for some reason, and the existing implementation supports and benchmarks multiple graph backends (networkx and scipy.sparse.csgraph): https://github.com/mikedh/trimesh/blob/2fcb2b2ea8085d253e692ecd4f71b8f450890d51/trimesh/graph.py#L376-L476
If you were looking at adding another backend that would be a great place to benchmark!
Connected components is supported in a zero code change GPU accelerated backend to NetworkX called nx-cugraph.
Are you interested in integrating that as one of the engine options for that function?