While working on reducing the memory use and .bin size of ESPEasy, also see issue #1849, we are currently working on a way of excluding unused protocols (and that's already working as intended, but needs some fine-tuning, see letscontrolit/ESPEasy#4181).
In ESPEasy, an end-user can select from a list of protocols for received IR codes (that also can be 'learned' automatically), but that list includes all theoretically available protocols, not the list of actually available protocols in the current build.
I have not found a way (yet) how to determine wether a protocol is available or not, so it can either be not included in the list (while parsing over the list as explained in #1181), or reducing that list to the selected/enabled protocols.
If needed I can start a PR to help solve this, f.e. by adding #if DECODE_<protocol> || SEND_<protocol> (or similar, as that's one way to change this) to the required spots in the code.
Not sure if this would be applicable to other parts of the code too.