Commit Graph

4 Commits

Author SHA1 Message Date
Julian Eisel 8115d31248 Outliner: (Refactor) Use C++ map instead of GHash
This container is type safe and contains a few nice optimizations,
although they shouldn't make a big difference here in practice. The
hashing now uses our default hashing method which reduces code
complexity and seems to perform slightly better in my tests.

For a Heist shot with a highly complex library overrides hierarchy in
the Outliner this reduces the tree building time from around 25 to 23.6
seconds here. However the main design change for performance is yet to
come, all this is just general code refactoring (which at least
shouldn't make performance worse).
2022-08-19 22:21:04 +02:00
Campbell Barton 1a3bc09e89 Cleanup: spelling in comments 2022-08-19 13:49:13 +10:00
Julian Eisel d2255aa4ed Outliner: Refactor outliner tree-hash interfaces with C++
- Turn storage into an object with "automatic" memory management (RAII)
  so freeing is implicit and reliable.
- Turn functions into member functions, to have the data and its
  functions close together with controlled access that increases
  encapsulation and hiding implementation details.
- Use references to indicate null is not an expected value.
- Related minor cleanup (comments, use const etc.)

Couldn't spot any changes in performance.
2022-08-18 20:22:55 +02:00
Julian Eisel 0be6427429 Outliner: Compile outliner tree-hashing files in C++
Some performance issues were found here with a heavy production file and
we want to look into using some C++ to improve things for this ancient
code.
2022-08-17 21:00:22 +02:00