Automattic / babble

Multilingual WordPress done right.
https://wordpress.org/plugins/babble/
245 stars 50 forks source link

Meta query in `Babble_Jobs::get_object_jobs()` #229

Closed simonwheatley closed 9 years ago

simonwheatley commented 9 years ago

The Babble_Jobs::get_object_jobs() method uses post meta parameters in a get_posts call. Post meta arguments in WP_Query and get_posts can be slow. We should look to make this more efficient.

simonwheatley commented 9 years ago

Probably not a critical issue, as number of jobs and therefore row cardinality will be low.

joehoyle commented 9 years ago

@simonwheatley we added object caching to this query in https://github.com/Automattic/babble/commit/9ec620206a438d4bc6726466381e3e9344f5d61d to help with performance. Do we need to look at a new way of storing the data here, e.g. a term relationship? If so, I'm not sure why we ever added the object caching.

Thanks!

simonwheatley commented 9 years ago

we added object caching to this query in 9ec6202 to help with performance. Do we need to look at a new way of storing the data here, e.g. a term relationship? If so, I'm not sure why we ever added the object caching.

Thanks, @joehoyle. I agree this issue is mitigated by object caching.

Happy to close this out to remove from this milestone, and wait to see if a problem actually develops or not.