Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CRM-21393: Event checkPermission should only check the specific event… #11242

Merged
merged 1 commit into from
Nov 5, 2017

Conversation

mlutfy
Copy link
Member

@mlutfy mlutfy commented Nov 4, 2017

…, if eventId was passed (for performance).

(copied from JIRA):

On a fairly normal site, with 2500 events, I noticed that loading any Event > Location page took 8 seconds for the full page load, where as normally pages take up to 2 seconds to load. This is in great part caused by the XHR/AJAX loading of various bits on the screen, which each took about 2 seconds to load. Still, XHR requests are normally pretty quick (600 ms).

Using php-xdebug profiling, I narrowed it down to CRM_Event_BAO_Event::checkPermission().

capture d ecran de 2017-11-03 23-34-49

@colemanw
Copy link
Member

colemanw commented Nov 5, 2017

That is a ridiculously complicated function for what it does. But it makes sense that you wouldn't need to fetch all events just to check permissions for one event.

@colemanw colemanw merged commit 992f2ce into civicrm:master Nov 5, 2017
sluc23 pushed a commit to ixiam/civicrm-core that referenced this pull request Jan 10, 2018
CRM-21393: Event checkPermission should only check the specific event…
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants