Skip to content

Conversation

@aaronjorbin
Copy link
Member

When passing args to WP_Query::__construct method (in this case, but creating a new WP_Query, this one internally executes the WP_Query::get_posts method and stores the result in the WP_Query::posts property. When calling the WP_Query::get_posts again, the same SQL query gets executed, and the result is again stored in the WP_Query::posts property.

Originally done in WordPress Core in https://core.trac.wordpress.org/changeset/51144 for https://core.trac.wordpress.org/ticket/53176 with props to jorbin and david.binda.

When passing args to WP_Query::__construct method (in this case, but creating a new WP_Query, this one internally executes the WP_Query::get_posts method and stores the result in the WP_Query::posts property. When calling the WP_Query::get_posts again, the same SQL query gets executed, and the result is again stored in the WP_Query::posts property.

Originally done in WordPress Core in https://core.trac.wordpress.org/changeset/51144 for https://core.trac.wordpress.org/ticket/53176 with props to jorbin and david.binda.
@youknowriad
Copy link
Contributor

Looks like there's a conflict (need a rebase), but other than that, this is looking good. Thanks for the backport :)

@aaronjorbin
Copy link
Member Author

@youknowriad yep, I fixed that up.

Copy link
Contributor

@youknowriad youknowriad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@youknowriad youknowriad added [Feature] Full Site Editing Backport to WP 6.9 Beta/RC Pull request that needs to be backported to the WordPress major release that's currently in beta [Type] Performance Related to performance efforts labels Jun 15, 2021
@youknowriad
Copy link
Contributor

(Added the backport to core label, just to make sure we include this in wp/trunk later as this is already in Core)

@youknowriad youknowriad merged commit cff6131 into trunk Jun 16, 2021
@youknowriad youknowriad deleted the backport/r51144 branch June 16, 2021 09:34
@github-actions github-actions bot added this to the Gutenberg 10.9 milestone Jun 16, 2021
@youknowriad youknowriad removed the Backport to WP 6.9 Beta/RC Pull request that needs to be backported to the WordPress major release that's currently in beta label Jun 21, 2021
youknowriad pushed a commit that referenced this pull request Jun 21, 2021
When passing args to WP_Query::__construct method (in this case, but creating a new WP_Query, this one internally executes the WP_Query::get_posts method and stores the result in the WP_Query::posts property. When calling the WP_Query::get_posts again, the same SQL query gets executed, and the result is again stored in the WP_Query::posts property.

Originally done in WordPress Core in https://core.trac.wordpress.org/changeset/51144 for https://core.trac.wordpress.org/ticket/53176 with props to jorbin and david.binda.
youknowriad pushed a commit that referenced this pull request Jun 21, 2021
When passing args to WP_Query::__construct method (in this case, but creating a new WP_Query, this one internally executes the WP_Query::get_posts method and stores the result in the WP_Query::posts property. When calling the WP_Query::get_posts again, the same SQL query gets executed, and the result is again stored in the WP_Query::posts property.

Originally done in WordPress Core in https://core.trac.wordpress.org/changeset/51144 for https://core.trac.wordpress.org/ticket/53176 with props to jorbin and david.binda.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Type] Performance Related to performance efforts

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants