Bug – 2 Queries Run For Every Single Product While Navigating Admin Dashboard

MultivendorX

Resolved
Viewing 7 reply threads
  • Author
    Posts
    • #190642
      Justin Harrison
      Participant

      Hi Support, currently when I load a page in the admin dashboard, it is showing that I am running over 10,000 queries because there is a function that is being called twice for each product in my MVX store. Here is the function being called: MVX_Product_QNA->get_Questions() and an example query “SELECT * FROM wp_mvx_cust_questions WHERE product_ID = 1930”. It is slowing down my admin dashboard running all these queries, not surprisingly. Can this be fixed where the query is only loaded on pages where it is needed. I know this is not needed on every WP Admin page. If you would like to test my findings, you can use the Query Monitor plugin on your own site to verify the issue. I attached a screenshot from Query Monitor to show some of the findings.

      Please advise on how to fix this as it is a major concern for slow down. Thanks!

    • #190693

      Hi,
      We have updated our code in our GitHub. please check.
      Thanks

    • #190696

      We will add the fix in our next update by next week.

      We have also added a fix in our GitHub.
      So, after downloading the plugin from here – https://github.com/multivendorx/MultiVendorX/archive/refs/heads/main.zip, follow these steps :
      – Delete the installed MultiVendorX via wp-admin >> plugin
      – Unzip the GitHub plugin
      – Rename the folder as “dc-woocommerce-multi-vendor” and remove the master tag. Now, zip this folder again.
      – Install this plugin on your site.
      Please do keep us posted

    • #191042
      Justin Harrison
      Participant

      Hi, I downloaded the plugin from GitHub and uploaded it. It did not fix this bug (although it did fix the other reported bug in another thread). I am still getting two queries run for every product which resulted in over ten thousand queries on every admin page load. I have temporarily fixed the issue by using the following code to disable to code that is causing it:

      add_filter(‘mvx_submenu_show_necesarry_count’, ‘__return_false’);

      My queries from went from 11,000+ per page load down to 420+ per page load and memory usage went from 220+ MB to 45+ MB per page load and page load time of 6+ seconds down to less than 2 seconds. A very significant change, so I would highly recommend getting this resolved or other people running your software with lots of products will have the same issue.

    • #191086
      This reply has been marked as private.
    • #191094

      Hi,
      We have added some modifications to our GitHub.
      Please check.
      Thanks

    • #191328

      We have also added a fix in our GitHub.
      So, after downloading the plugin from here – https://github.com/multivendorx/MultiVendorX/archive/refs/heads/main.zip, follow these steps :
      – Delete the installed MultiVendorX via wp-admin >> plugin
      – Unzip the GitHub plugin
      – Rename the folder as “dc-woocommerce-multi-vendor” and remove the master tag. Now, zip this folder again.
      – Install this plugin on your site.
      Please do keep us posted.

    • #194661

      It’s been long and we have not heard back from you. We presume your issue is solved now. We are closing this thread. If you need help or face issue in future please open a new thread.

Viewing 7 reply threads

The topic ‘Bug – 2 Queries Run For Every Single Product While Navigating Admin Dashboard’ is closed to new replies.