#Tag vs enablable tag?

1 messages · Page 1 of 1 (latest)

modern cairn
#

Adding a tag component is a structural change, which we want to avoid, and requires a ECB. But enabling/disabling a tag component isn't a structural change and doesn't require a ECB.

So if you know you will want the tag, is there a reason to not just add it disable from the start, and then get and enable it as needed instead of adding it? Or is doing that bad practice in some way?

Especially since there is WithDisable in the query (not sure the actual performance of that or what it code gens though)

candid condor
#

IsDead is enablable for us

#

works great

modern cairn
#

Cool 👍

frozen plinth
#

Technically there's a small performance loss with looping over them. I'd assume they also won't work with SIMD? But I couldn't find any confirmation on that, just that the check itself uses SIMD. I would recommend using them until you actually measure a performance loss though. You can add it as disabled from the start too, no problem with that

We use a few tag components we add and remove, but that's because it can take several minutes between each time we need to change a tag. So for our use-case it makes more sense with a tag, but also not a super big deal

modern cairn