• Resolved odoremieux

    (@odoremieux)


    One of my clients couldn’t access the media library anymore, is was timing out every time. The display is 250 items per page.

    In your function display_post_list_column, the query that gets the post_ids, took over 3 seconds per query, so it’s called 250 times, which caused the timeout.

    I did some testing, in the query instead of doing LIKE ‘_thumbnail_id’, if you do = ‘_thumbnail_id’, from over 3 seconds, it takes 0.3s, 10 times faster, with this fix, it doesn’t timeout anymore.

    In this case the LIKE is not necessary, because you know the exact meta_key you are looking for.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Kybernetik Services

    (@kybernetikservices)

    Thank you @odoremieux for your message.

    First of all I have to write I never tried 250 items per page in the media library.

    Can you please clarify if you have the list view or the grid view?!

    Can you please explain how did you add the option to show 250 items per page? As far as I know, WordPress shows 20 items per page.

    Thread Starter odoremieux

    (@odoremieux)

    It’s the list view

    On the media library if you go at the top (screen options), you can select the number of items displayed on the page. You can do that for any post type

    Side note the media library has over 67000 items, which has an impact of the query.

    The LIKE compare characters per characters, = just the string

    Plugin Author Kybernetik Services

    (@kybernetikservices)

    Dear @odoremieux.

    Thank you again for your message and your suggestion for improvement. I double checked the problem and added your solution to the codebase.

    The new version 13.7 has just been uploaded.

    Please let me know if you have further issues or improvements. I’m always open to any new idea or improvement.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Performance issue’ is closed to new replies.