• Resolved Roman Matovsky

    (@fireroman)


    I found 4,000 duplicate queries using the Query Monitor plugin on one of my client’s websites when I visit the page /wp-admin/upload.php. Could this be fixed in the next update?

    1.

    Query:
    SELECT?IFNULL(COUNT(*), 0)
    FROM?wp_pmr_status

    Count: 2000

    Time: 0,1738

    Callers: Phoenix_Media_Rename->write_db_value() 2000 calls

    Components: phoenix-media-rename 2000 calls

    Potential Troublemakers: Phoenix_Media_Rename->write_db_value() 2000 calls

    2.

    Query:
    UPDATE wp_pmr_status
    SET current_image_index = ‘0’
    WHERE ID = 1

    Count: 500

    Time: 0,0467

    Callers: Phoenix_Media_Rename->write_db_value() 500 calls

    Components: phoenix-media-rename 500 calls

    Potential Troublemakers: Phoenix_Media_Rename->write_db_value() 500 calls

    3.

    Query:
    UPDATE wp_pmr_status
    SET bulk_rename_in_progress = ”
    WHERE ID = 1

    Count: 500

    Time: 0,0393

    Callers: Phoenix_Media_Rename->write_db_value() 500 calls

    Components: phoenix-media-rename 500 calls

    Potential Troublemakers: Phoenix_Media_Rename->write_db_value() 500 calls

    4.

    Query:
    UPDATE wp_pmr_status
    SET bulk_rename_from_post_in_progress = ”
    WHERE ID = 1

    Count: 500

    Time: 0,0388

    Callers: Phoenix_Media_Rename->write_db_value() 500 calls

    Components: phoenix-media-rename 500 calls

    Potential Troublemakers: Phoenix_Media_Rename->write_db_value() 500 calls

    5.

    Query:
    UPDATE wp_pmr_status
    SET bulk_filename_header = ”
    WHERE ID = 1

    Count: 500

    Time: 0,0380

    Callers: Phoenix_Media_Rename->write_db_value() 500 calls

    Components: phoenix-media-rename 500 calls

    Potential Troublemakers: Phoenix_Media_Rename->write_db_value() 500 calls

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author crossi72

    (@crossi72)

    Hi @fireroman,
    I’ll start working immediately on this optimization!

    Thank you for reporting
    C.

    Thread Starter Roman Matovsky

    (@fireroman)

    Thanks a lot @crossi72 !

    Plugin Author crossi72

    (@crossi72)

    Hi @fireroman,
    I completely rewrote the logic to avoid using database, I will release the new version as soon as the test protocol will be completed, I hope at the start of the next week.

    C.

    Thread Starter Roman Matovsky

    (@fireroman)

    @crossi72 Thanks for the update! Looking forward to the new release.

    Plugin Author crossi72

    (@crossi72)

    Hi @fireroman,
    I just released version 3.12.4 that uses cookies instead of database to store temporary information.

    The cookies are strict, so they cannot be accessed from other domains, there is nothing important in the cookies, but i prefer to use a safe approach.

    These are the cookies used by version 3.12.4:

    • phoenix_media_rename_current_image_index, stores current image index during bulk rename operations
    • phoenix_media_rename_bulk_rename_in_progress, store bulk rename status
    • phoenix_media_rename_bulk_rename_from_post_in_progress, store bulk rename status for “rename from post” operation
    • phoenix_media_rename_bulk_rename_bulk_filename_header, store bulk rename constant filename part

    Let me know if you find some issue
    C.

    Thread Starter Roman Matovsky

    (@fireroman)

    @crossi72 Thanks for the release! Switching to cookies sounds like a solid choice for security. I’ll test it out and let you know if I run into any issues.

    Plugin Author crossi72

    (@crossi72)

    Thank you, who reported the problem ??

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