I profiled the simplify_neuron function on a large neuron with 76296 vertices. The function took 10 sec to run, out of which Dijkstra took almost 1.5s, and then this apply around 6s in total (in a few iterations)
furthest_leaf_idx = which.max(apply(dd, 2, robust_max))

Attached profviz object from the image above.
simplify_neuron_profile.rda.zip
I profiled the
simplify_neuronfunction on a large neuron with 76296 vertices. The function took 10 sec to run, out of which Dijkstra took almost 1.5s, and then thisapplyaround 6s in total (in a few iterations)Attached
profvizobject from the image above.simplify_neuron_profile.rda.zip