The common case when getting the metadata of a bean is that the metadata is in the map. So we should do a simple lookup first and return early if it's present in the map. That's one more lookup in the case where we don't have the metadata but it should happen only once per bean. Note that a new lambda instance is created for every call so it reduces memory allocation. |