Tuning it hasn't really come up, no. Back in the day I considered adding some memoization, but it will have to be done carefully. I also poked around and looked for some pre-optimized graph libs but nothing seemed like it was going to be a big enough win for us, considering that our graphs aren't enormous (millions of nodes) and we're not doing particularly sophisticated operations on them