• I have a blog that has nearly 5000 posts. If I select “Posts” as a “Sortable Post Types”, it basically causes the admin for the entire site to load very very slowly and usually results in a 504 error.

    I’ve used this plugin on the same site when only having about 200 posts and it works just fine. I’m guessing that the large number of posts is causing the issue.

    Is there a way to have it so it only looks at the first 20 posts or something like that or is the another way to solve this issue?

    https://www.ads-software.com/plugins/intuitive-custom-post-order/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter bigmike7801

    (@bigmike7801)

    I added: $wp_query->set( 'posts_per_page', 20 ); to the hicpo_pre_get_posts() function and that seems to have cleared up the issue. However I’m not sure if this will have any negative results to the overall plugin.

    Should I not do this? Should I do it a different way?

    Hey,
    we see a similar performance drain here on cpts that have many (1000+) posts and it is related to this plugin.
    i thought i’d write in your open topic instead of opening a new thread…

    when using the plugin “query monitor” to identify slow DB queries, we found that the plugin sets a write(!) request for every single post/entry of that cpt when adding or trashing a post.
    that results in massive database traffic by one single user action alone and makes the site unresponsive to the user for about 1-2 minutes and potentially longer.

    the problem is the part for changing the menu order index in the function refresh() which is run on admin-init.

    this part should definitely be improved to make only a single combined database update call if possible (maybe with some serious mysql magic) or limit those db updates by processing chunks or maybe there’s another approach to this task.
    i don’t have a working example, though.

    regards,
    daniel

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Plugin causes admin to load very slowly (if at all)’ is closed to new replies.