humanmade / hm-content-import

Migration framework for WordPress, attempts to reduce overhead in migrating content from differing data sources
GNU General Public License v3.0
27 stars 7 forks source link

Improve meta lookup handling #57

Closed tcrsavage closed 3 months ago

tcrsavage commented 5 years ago

Currently we use unique meta_key entries per imported post object on the assumption that this is better for performance because the meta_key DB column is indexed.

From personal experience there is no noticeable performance improvement using this approach, presumably because the SQL index cache gets busted when a new entry is added. This approach also causes issues for projects with elasticsearch integrations because elasticpress isn't set up to deal with large numbers of unique field keys.

Instead of using this unique meta key approach, it would be better to use object cached meta lookups.

We should implement a cross integration with the https://github.com/humanmade/meta-lookups/ framework and remove the hmcilookup implementation currently in place.

joehoyle commented 3 months ago

We instead moved to storing hte lookup in the meta_key, which is indexed per https://github.com/humanmade/hm-content-import/pull/78