Version 1.2.5.2 seems to have resolved the bug that was occurring before with multiple pages of deleted POIs during the sync process. However, the action to delete them is still taking quite a bit longer than we'd like, and I think it's causing timeouts on some client sites.
Dev
[ ] Review Otis_Importer.php and the _delete_removed_listings function, as well as its use of wp_otis_get_post_id_for_uuid() in lines 685-693
[ ] My thinking is that there's no reason we have to run an expensive meta query once per item when we know we're looking at multiple items at a time
[ ] In wp-otis.php, write an alternative version of wp_otis_get_post_id_for_uuid that accepts multiple UUIDs at once and queries for all the matches, returning the full result set (not sure if we would need to paginate this kind of thing?)
[ ] Update _delete_removed_listings to use the new function and also gut-check me on this to see if there are other optimizations we could make
Overview
Version 1.2.5.2 seems to have resolved the bug that was occurring before with multiple pages of deleted POIs during the sync process. However, the action to delete them is still taking quite a bit longer than we'd like, and I think it's causing timeouts on some client sites.
Dev
Otis_Importer.php
and the_delete_removed_listings
function, as well as its use ofwp_otis_get_post_id_for_uuid()
in lines 685-693wp-otis.php
, write an alternative version ofwp_otis_get_post_id_for_uuid
that accepts multiple UUIDs at once and queries for all the matches, returning the full result set (not sure if we would need to paginate this kind of thing?)_delete_removed_listings
to use the new function and also gut-check me on this to see if there are other optimizations we could make