Page MenuHome

Cleanup: don't use global variable for test if IDs are identical
ClosedPublic

Authored by Brecht Van Lommel (brecht) on Apr 3 2020, 5:14 PM.

Diff Detail

Repository
rB Blender

Event Timeline

Well, this is adding one extra loop potentially over the whole file content... Not sure am thrilled by that, but on the other end I guess this will not be a performance issue, and it does make the code a bit cleaner.

This revision is now accepted and ready to land.Apr 6 2020, 12:30 PM

Since this makes D7328 possible, I think it will be faster in the average case where you don't need to do a memory allocation and memcpy for the entire ID memory.

This can be optimized later too. I think we should really be storing bheads grouped per ID somehow, and then it would be easy to have a single boolean stored per ID to indicate if it's identical or not.

This can be optimized later too. I think we should really be storing bheads grouped per ID somehow, and then it would be easy to have a single boolean stored per ID to indicate if it's identical or not.

Indeed!