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

perf: store donation meta data results under correct cache key #3359

Closed
2 tasks done
ravinderk opened this issue Jun 13, 2018 · 4 comments
Closed
2 tasks done

perf: store donation meta data results under correct cache key #3359

ravinderk opened this issue Jun 13, 2018 · 4 comments
Assignees

Comments

@ravinderk
Copy link
Collaborator

ravinderk commented Jun 13, 2018

Bug Report

User Story

As an admin, I want my website to load faster, but currently, I am seeing additional meta queries on each page load ( Query Monitor ).

ref: https://secure.helpscout.net/conversation/759921560/0/?folderId=672194

Current Behavior

We are using WP_Query to get donations or form then by default WordPress loads metadata of each donation to cache within post_meta key.

https://github.com/WordPress/WordPress/blob/32ee2ed5734357d5faa5537d9916ada07f672eaf/wp-includes/meta.php#L888

We have custom meta table for donation and form, so whenever we do meta query then we define meta_type and it is used to search meta query result in cache. We always get cache miss because cache always store under post_meta key instead of donation_meta
https://github.com/WordPress/WordPress/blob/32ee2ed5734357d5faa5537d9916ada07f672eaf/wp-includes/meta.php#L520

We can reduce a lot of query by storing meta cache under correct cache key.

Acceptance Criteria

  • Meta query result does store into correct meta cache object. For example, meta cache stores into donation_meta if meta type is donation
  • Meta cache updates when editing donation
@ravinderk ravinderk changed the title perf(query): improve meta query performance perf: improve meta query performance Jan 28, 2019
@kevinwhoffman
Copy link
Contributor

@ravinderk Please complete the issue template so we can understand how this affects the user. It's unclear whether this affects front end or back end performance, or both. Every issue also needs acceptance criteria.

@ravinderk
Copy link
Collaborator Author

ravinderk commented Jan 28, 2019

@kevinwhoffman This was an old issue which I created. I added few lines to remind myself. I will update this by tomorrow

@ravinderk ravinderk changed the title perf: improve meta query performance perf: store meta data results under correct cache key Jan 30, 2019
@ravinderk ravinderk changed the title perf: store meta data results under correct cache key perf: store donation meta data results under correct cache key Jan 31, 2019
@ravinderk
Copy link
Collaborator Author

@kevinwhoffman I changed the title and scope of this issue. We will fix donation meta cache related issue in this and i will add another issue for form and donor

DevinWalker pushed a commit that referenced this issue Feb 1, 2019
perf: store donation meta data results under correct cache key #3359
@ravinderk
Copy link
Collaborator Author

reopening this issue to test again with #3983 and #3982

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

No branches or pull requests

3 participants