Page MenuHome

Nodes: Avoid small allocations for internal links
ClosedPublic

Authored by Hans Goudey (HooglyBoogly) on Jan 9 2023, 11:45 PM.

Details

Summary

Since internal links are only runtime data, we have the flexibility to
allocating every link individually. Instead we can store links directly
in the node runtime vector. This allows avoiding many small allocations
when copying and changing node trees.

Diff Detail

Repository
rB Blender

Event Timeline

Hans Goudey (HooglyBoogly) requested review of this revision.Jan 9 2023, 11:45 PM
Hans Goudey (HooglyBoogly) created this revision.

I wonder if we could try not to use bNodeLink at all instead.

That would be nice. The RNA changes would be more complicated though. Maybe it makes sense to commit this first? I can look at that next.

Actually, if we did that we might want to change the RNA API by adding a separate RNA type for internal links. So it probably should be a separate commit.

This revision is now accepted and ready to land.Jan 10 2023, 12:47 AM