oa_core_get_group_from_node() references the variable $node_type where $allowed_types was meant. This prevents an optimization when $node->type is in $allowed_types.

I think in many large Drupal websites the entitycache module is installed. Quite a lot of utility functions in oa_core assume that node_load() is slow and access the database directly, while it might actually be faster to call node_load() when entitycache is enabled.

Comments

Jorrit created an issue. See original summary.

Jorrit’s picture

Status: Active » Needs review
StatusFileSize
new3.25 KB

Please see the attached patch.

mpotter’s picture

I'm always nervous about messing with caching at this point given that I have so little time to test or support Atrium. There was a time when entitycache didn't work well with Atrium. So yes, there was a lot of work done on Atrium performance to improve it without needing entitycache. I'd need to see some benchmarks and testing from more people before making caching changes.

Jorrit’s picture

I understand the difficulty in reviewing the more complicated patches that I submit. Perhaps you could commit just the first bit, which is a small bugfix and wait for the larger, entitycache related, piece until more testing has been done?

Anyway, thanks for your time in reviewing and committing the patches that I submitted.

mpotter’s picture

Sure, could you submit a smaller patch? In the middle of getting a release ready for the Panopoly update yesterday so any help would be appreciated!

Jorrit’s picture

StatusFileSize
new1.54 KB

Here you go. I didn't test it because I am working on a different computer now but these are the changes from the original patch that seem safe to me.

mpotter’s picture

OK, that definitely fixes a bug, so committed to 01211f7. To keep this patch issue clean, do you want to create a new issue for the entitycache patch and then close this as Fixed?

Jorrit’s picture

I will do that next week.

Jorrit’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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