You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I understand that the post_id is cached, so it's possible that there is only one lookup, so we may only be replacing a lookup in the post-meta table to a lookup in the posts table, but according to Thomas' article, that one lookup would be significantly more performant.
The text was updated successfully, but these errors were encountered:
The initial version of the plugin worked that way. However, because there are often filters that plugins will run against post content, it can sometimes mangle the data. See 66c0ebc
Oh interesting. Those filters wouldn't touch the content if you called $post->post_content directly, would they? Or did you see the filters happening when doing the wp_insert_post? Either way, serializing the data would definitely make it more brittle than json_encoding it.
I think we could improve performance by cutting out the extra post-meta lookup by storing the option json_encoded to the post_content. @thomasgriffin wrote an excellent post exploring this very idea: https://thomasgriffin.io/wordpress-performance-outside-box-handling-retrieving-data/
I understand that the post_id is cached, so it's possible that there is only one lookup, so we may only be replacing a lookup in the post-meta table to a lookup in the posts table, but according to Thomas' article, that one lookup would be significantly more performant.
The text was updated successfully, but these errors were encountered: