cortoproject / corto

A hierarchical object store for connecting realtime machine data with web applications, historians & more
https://www.corto.io
MIT License
87 stars 14 forks source link

Improve performance of freeing objects #618

Closed SanderMertens closed 7 years ago

SanderMertens commented 7 years ago

Currently, resources of an object are deallocated by walking over its metadata. Because metadata (type objects) can contain many indirections, and has to evaluate parts of the type that are not relevant for cleaning up memory, this takes longer than necessary.

A dedicated routine is required that cleans up objects that precomputes indirections, and leaving out information that is not relevant.

This will particularly speed up scenarios where objects are frequently allocated / deallocated.