NodeTree drawing might not have clipping optimization?

Hello

i have a very large nodetree here (i know that I’m kinda pushing the limit, but I’m stuck on dividing this in nodegroups because there’s no proper solutions for enum yet )

i had reports that the node is difficult to navigate on laptop
and it seem a bit strange, because only a small minority of the nodetree is shown to users in the 2dviewport. (impossible to see everything even in max zoom out level)

It seems that High zoom or Low zoom didn’t change anything in term of performance,
and this is raising a question:
is it possible that the nodetree drawing code is not clipping elements outside the user view?

:face_with_monocle:

6 Likes

I’ve been curious about this before. Just from looking at the code, I’ve noticed that node tree drawing is not very optimized. But I haven’t actually seen performance bottlenecks in practice. Looks like you have!

In general nodes outside of the view often still have to be partially drawn in order to figure out their height, or the direction of node noodles that leave the screen. So the optimization isn’t as trivial as you might think.

2 Likes

Any chance you can share a worst case .blend file? kinda curious where most of the time is spend.

1 Like

Sure here’s the nodetree
license is Royalty free, for 2.93 (WIP)

https://pasteall.org/blend/7499451ec6d946cb8f7c237faff0c66b

My computer can handle it fine
As i said some friends laptops seem to have a hard time with it

Because there’s some mouse travel distance here, i created a little plugin that creates shortcuts

If you want worst case, i guess that you duplicate all nodes 2 or 3 times. then it’s like 1-2FPS on my machine (2080ti)

2 Likes