Problem/Motivation

Third and last performance related task, for today anyway. i noticed that there are quite often several requests to load the group_content entity for the same entity per request, e.g. node access calls for different operations.

Proposed resolution

So I added static caching loadByEntity() and also made sure that gnode_node_access() as well as gnode_node_access_records() use that API.

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

CommentFileSizeAuthor
#2 gnode-loadbyentity-3029878-2.patch4.37 KBberdir

Comments

Berdir created an issue. See original summary.

berdir’s picture

Status: Active » Needs review
StatusFileSize
new4.37 KB
jayelless’s picture

Applying the patch in #2, along with #3029849: Statically cache gnode_node_grants(), to a system with hundreds of groups, each having dozens of nodes and some users subscribed to all groups solved a timeout problem when retrieving content for the group. The timeout disappeared and the content was display within a few seconds.

thomasmurphy’s picture

We've applied this on a complex site which had a lot of performance problems and it helped substantially with no new bugs observed.

thomasmurphy’s picture

Status: Needs review » Reviewed & tested by the community

kristiaanvandeneynde’s picture

Status: Reviewed & tested by the community » Fixed

Perfect! Thanks and sorry it took so long for me to spot and commit. I've been shying away from issues that touch on node grants.

Status: Fixed » Closed (fixed)

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