There can be a lot of parents. When calculating parents, this can mean a damn lot of entity_loads. Let's reduce that if possible, as only thing we actually need to look up is a single field value.

This does mean extra queries if parent had already been loaded, as entity_load is cached, but they're rather quick queries as far as I can tell.

Comments

hefox’s picture

Status: Active » Needs review
StatusFileSize
new4.09 KB
hefox’s picture

More removal of entity load

mm wish i could get rid of entity load in check member access that is used purely to get bundle, but don't know of any other generic way to get the bundle without entity load/extract ids...

mpotter’s picture

Status: Needs review » Reviewed & tested by the community

Been using this for a while in Open Atrium so marking it RTBC. Will commit it soon unless there are objections.

  • mpotter committed 3aa2dc9 on 7.x-2.x authored by hefox
    Issue #2438445 by hefox: Don't call entity_load when calculating parent...
mpotter’s picture

Status: Reviewed & tested by the community » Fixed

Committed to 3aa2dc9.

Status: Fixed » Closed (fixed)

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