Overhead of storing multiple content entities vs storing multiple versions of a single entity

Hi!

I am wondering if someone here experienced with Confluence internals could give some insights on this question :slight_smile:

I have a use case where I would like to have some data stored in custom content entities under a page.
The custom content needs to be versioned because it can be referenced by macros, and restoring an old version of a page needs to be supported. In the old version of the page, the macro can reference an old version of the custom content.
All of the custom content is scoped under a page, and can be deleted (all versions) when the page is deleted.
I have a working proof-of-concept implementation where all of this is handled by referencing the custom content entity objects by their title and version.
However, in some cases it would be much simpler (conceptually and also in the code) to always create a new custom content entity object for a new version, and keep also the “old” custom content entities around until the whole page is deleted. This way referencing a version of the data would need just referencing the title of the correct custom content object.

I am wondering if having let’s say 100 custom content entity objects under a page would have significant overhead compared to having eg 2 custom content entity objects and 50 versions for each of them?

At the moment I am using the approach to include required versioning information in the custom content title and not use the actual Confluence version at all.
Thus far I’ve noticed one downside:

  • the Incoming Links section on Page Information gets spammed in some cases because it now shows all the version of my custom content item containing link to the page, not only the latest, because the custom versioning strategy is not visible to Confluence