2

I often have these questions that refer to optimization in terms of speed.

For example, just last week I hammered down a function that rendered some social sharing links that took way too much to load from 100ms+ to 2ms.

It was amazing. Often times I wanna ask the community what they think I should do when facing these issues, but I think these questions can fall in the category of "opinion-based", altough, on the other hand, I believe they can be very fruitful and given the right opinion, the right answer can be provided.

Surely, this type of question is a never-ending quest for a better answer, but the community could understand that for this time, this answer is what we perceive as the best.

As such:

Is this allowed?

2 Answers 2

3

I believe these types of questions are better asked via chat, forums, or on Code Review as they often promote discussion regarding why certain decisions were made during development or why a specific optimization route was taken. While sometimes optimizing a code snippet can be straight-forward and gain a single well received answer I think it would be rare and not happen often enough to fit the current guidelines of this site.

This is only 1 mods view on it and would love to hear from others in the community whether they believe these types of questions would be a good fit.

3

Honestly I do think that questions about how to optimize a piece of (reasonably short) code are in scope if the optimization involves WordPress knowledge.

For example, if an user found a MySQL slow query caused by a some set of WP_Query arguments, I think would be in scope asking how to optimize the code to don't cause that slow query.

Surely, different people can propose different solutions, but that does not mean it is "opinions based": slow query is a misurable thing, so it is misurable if the given answer is correct or no.

If the wanted optimization does not require WordPress expertice, then it's already off topic for another reason, and yes, Code Review stack could be an option in that case.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .