Mark entity as changed from authoring component

How do I mark an entity as changed from my authoring component? I have a few systems running expensive operations in the editor and at runtime. I need a way to only perform these operations on entities that have been marked as changed. Otherwise I would perform expensive calculations just to get the same results I already had. Waste of compute power.

My first thought was to use enableable tag components. I would enable them in my baker, then the system would perform its calculations and disable the tags. Problem with this solution was that the bakers were unable to toggle the flag on again after the systems had toggled it off. Weird considering the baker re-adds the component on each bake, but can probably be explained by how enableable components work under the hood.

Second approach I tried was to add the tag in the baker, then remove it in my system. This seemingly worked until my bakers started to freak out during their undo process. The baker knew it had added the tag, but when it tried to remove it, the component was already gone, and so I got an error.

Any idea on how to go about this? Is there a data-oriented approach that is more suitable or is bakers the right path?

I am a bit confused here that you talk about editor, bakers and runtime at the same time.
The baker itself can handle changes when you use DependsOn in a baker.

This also sounds like you want to look into BakingSystems as they have temporary components that could be useful for you.
If that’s not sufficient, runtime systems can use change filters, although that’s just on chunk level. For anything more granular you’d need to use enableable comps.

Anyway, getting in the baker is certainly not a good idea as it expects a very defined flow of data. In case this is about editor tools, maybe change the managed data itself and let the baker handle it instead of going the other way around.