During work on the my latest project I've faced problems with number of queries which are executed by the entity_get_uuid_by_id and entity_get_id_by_uuid() functions. I've looked at the code and found that one @todo says that it would be great to implement static caching for these functions. So I've spent some time and tried to create a patch. I've decided that it would be great to share cache between these both functions, but maybe someone can suggest better way?

And BTW, In my case number of queries reduced from 119 to 21 after applying the patch.

Comments

skwashd’s picture

Status: Needs review » Fixed

Thanks for the patch, it looks solid.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.