- Issue created by @roderik
- 🇳🇱Netherlands roderik Amsterdam,NL / Budapest,HU
Hit-and-run thought: per #3440446-11: Add prepareBuild step similar to entityprepareView →
(If it's just a question of doing a loadMultiple, then fine - but the example code contains access/caching magic that I don't want to get stuck in, before handling some other priority issues.)
...it can't be just a question of doing a loadMultiple... right? Because if that were the case... we would surely not need to do that prepareBuild()?
We might as well do that in build(). (That also makes it easier to, in theory, implement a memory-saving option that loads the entities in batches.) - 🇦🇹Austria fago Vienna
> ...it can't be just a question of doing a loadMultiple... right?
afaik, thiis is only it. this is the main thing, consider loadign 100 nodes with a single node_load vs one multiple. the multiple load will make sure those are in static cache, so single loads afterwards are fine. but 100 single load operations are a big big big performance penalty. it's 100x every hook, every db query.
- 🇦🇹Austria fago Vienna
see https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Field%21P... for the core logic