NBT target selector argument is very poorly optimized
I have been messing around with the new NBT target selector, and I noticed this in the built-in debugger:
[00] commandFunctions - 18.26%/18.26%
[01] | minecraft:tick - 99.53%/18.18%
[02] | | execute as @e[nbt={SelectedItem:{id:"minecraft:carrot_on_a_stick",tag:{Unbreakable:1b,Damage:2}}}] run tag @s add tc_wrench_hold - 26.63%/4.84%
If you look at the performance usage, it seems quite high (26.63%/4.84%!) compared to this example:
[02] | | execute as @s[tag=tc_wrench_canuse] at @s[tag=tc_wrench_canuse] if block ~ ~ ~ minecraft:piston[facing=up] run function techcraft:wrench/actions/rotate_piston_0 - 0.90%/0.16%
2018-02-06, 06:16 PM
2018-02-07, 03:18 PM
2018-02-07, 03:18 PM
0
2
-