Is there a more performant way to dynamically detect if Content Notes is enabled?
I see that getGlobalDescribe can be used to check the presence ContentNote, if it present then is enabled. Usually, the time is around 400-500ms on the first call and very little in subsequent calls - around 40ms. So, I see caching reducing the CPU Time consumption for subsequent calls but if the initial call could be reduced, that would be even better.
Getting rid of the describe call is a possibility if is reliable and more performant.
e.g.:
Map<String, SobjectType> gd = Schema.getGlobalDescribe(); Boolean isContentNotesEnabled = gd.get('ContentNote') != null;