Performance Issues

Support MB Blocks Performance Issues

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #35965
    alpha.mediaalpha.media
    Participant

    I am running into performance issues when using MB Blocks on sites that have over a few thousand posts published. I use quite a few "Post" and "Taxonomy" field types in my blocks and I find that the block options take a while to load and also run into issues with blocks when having to use the "post" search field. Making the user put in a post ID is not an option as I need to have a friendly user interface so I like using the select advanced with posts and taxonomies.

    I have implemented a minimum input length to not stress the text input as much, along with reducing the query return to 5, however that doesn't seem to really do much. I also have turned off all core WordPress blocks and am only loading the meta box ones I created as custom blocks.

    I am curious if you have any thoughts on other field settings or things I could do to try to speed up the loading of block options and reduce strain on the server for the advanced post search field? There may be options I am not aware of that I would like to try out.

    #35973
    Long NguyenLong Nguyen
    Moderator

    Hi,

    Currently, the field post is also optimized for the query post. That means there are 10 posts (default, you've set it to 5) that will be queried to display per keyword.

    The same query is also cached on the database, see this code https://github.com/wpmetabox/meta-box/blob/master/inc/fields/post.php#L170

    So I don't think it is a performance issue with the field itself. You can try to optimize your database or use an object cache plugin such as Memcached, or Redis or limit searching posts with the setting query_args to speed up the search time.

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.