WordPress / developer-blog-content

In this GitHub space, WordPress team coordinate content to be published on the Developer Blog. Discussion and montly meetings (first Thu) in WP Slack #core-dev-blog
38 stars 4 forks source link

Optimizing your WP_Query queries for better performance #128

Open bph opened 1 year ago

bph commented 1 year ago

Discussed in https://github.com/WordPress/developer-blog-content/discussions/27

Originally posted by **bph** December 4, 2022 Thank you to @zzap for suggesting this topic. Can you think of an outline for a blog post? What specifically should be covered?
OlaIola commented 11 months ago

I am woring on this. Planned date for the draft—November 20th.

bph commented 9 months ago

@OlaIola Just checking in if there are any blockers on your progress I could help remove?

OlaIola commented 4 months ago

The article draft: https://docs.google.com/document/d/1Dre7ykgmfqH0IuyBQJBhKiHykQshyJTHz0SslqiJ2Jc/edit?usp=sharing @bph @zzap

zzap commented 4 months ago

@OlaIola, thank you so much for working on this topic. It is an extremely important one, as I see many bad practices resulting from not understanding what happens when a query is processed.

I reviewed the draft. At first, I started leaving comments directly in the document, but then I noticed the same issues being repeated, so I'll give general feedback here.

The draft does not feel ready for review. The examples and descriptions of problems are unclear. I don't understand the situations you are explaining, and then I'm not sure if the code example shows good or bad practice. I would suggest revising each problem and trying to answer the following questions:

You're listing quite a few situations/problems. I'd rather choose 3-5 of the most performance-impactful ones and go into detail with them than have 21 unclear ones. It is OK to state that the article will not cover all situations in detail and just list the rest as the ones to pay attention to and thoroughly test when using.

Please let me know if you want to discuss this further. Thank you :heart:

OlaIola commented 4 days ago

The second version is waiting to be reviewed. The same file: https://docs.google.com/document/d/1Dre7ykgmfqH0IuyBQJBhKiHykQshyJTHz0SslqiJ2Jc/edit?usp=sharing