WordPress.org

Forums

Business Directory Plugin
[resolved] Category page slow loading problem (6 posts)

  1. floordesign
    Member
    Posted 2 years ago #

    I've inserted 6000 listings using CSV import (I've defined about 8 fields for each listing) and 46 categories.
    Category pages are loading very slow and I think it's a MySQL query problem.

    Take a look on the following log (from MySQL slow query log) for a category page query. (Rows_examined: 36644164 !!! and 44 seconds)

    # Query_time: 44  Lock_time: 0  Rows_sent: 5863  Rows_examined: 36644164
    SELECT DISTINCT listing_id FROM wp_wpbdp_listing_fees WHERE listing_id
     NOT IN (SELECT listing_id FROM wp_wpbdp_listing_fees WHERE category_id
     IN (19) AND (expires_on IS NULL OR expires_on >= '2012-12-03 20:48:33'));

    Please check this problem and send a feedback.
    Thanks a lot.

  2. businessdirectoryplugin
    Member
    Plugin Author

    Posted 2 years ago #

    Hi floordesign,

    Sorry to hear that you ran into this. We'll look into it. It would help if we could get a copy of the CSV file you used to help reproduce the problem more quickly. Can you send it via the contact form? http://businessdirectoryplugin.com/contact/

    Please link to this forum post for context.

  3. businessdirectoryplugin
    Member
    Plugin Author

    Posted 2 years ago #

    Hi Florin,

    So, we've looked at this and we have a solution but it will have to wait for the next release. It's not easy to patch.

    In the meantime, you can get around the performance issue with this hack:

    Change the body of get_expired_listings() inside listings.php (line 313) so it ends up just like this:

    public function get_expired_listings($category_id, $include_subcategories=true) {
    return array();
    }

    The results will not be as accurate (you'll see some expired listings, but not all), but it will handle the performance problem for now. Full solution coming in the next release.

  4. floordesign
    Member
    Posted 2 years ago #

    I've modified the /api/listings.php as you mentioned but it didn't boost the page loading.
    The slow query looks like earlier...

    # Query_time: 36  Lock_time: 0  Rows_sent: 6015  Rows_examined: 37300096
    SELECT DISTINCT listing_id FROM wp_wpbdp_listing_fees WHERE listing_id NOT IN (SELECT listing_id FROM wp_wpbdp_listing_fees WHERE category_id IN (11) AND (expires_on IS NULL OR expires_on >= '2012-12-10 17:52:36'));

    Thanks for your support. I'll wait for your update.

  5. flgirl
    Member
    Posted 2 years ago #

    My business Directory plug-in is causing my site to slow down quite a bit. I isolated what is slowing down my site to a crawl and that's the plugin that's locking it up. I really need to keep it up because of advertisers so I need some advise as to what to do. Can anyone help?

  6. businessdirectoryplugin
    Member
    Plugin Author

    Posted 2 years ago #

    Hi flgirl,

    We have added a number of performance enhancements to the next version and several testers have reported marked increase in speed after using that upgrade. You can try the beta now or wait until it releases next week. Contact me if you want to go with the beta. http://businessdirectoryplugin.com/contact/

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Business Directory Plugin
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic