This was the line that showed up in the profiler and took almost 5ms: https://github.com/elastic/kibana/blob/ea7c78d10eaf2f80265eea0a564eda0607c58147/src/core/server/saved_objects/mappings/lib/get_root_properties_objects.ts#L46