Closed torvista closed 5 months ago
I've modified this, so a category id with a wildcard "12*" will omit all the products in the subcategories. Saves a lot of typing!
... and since p.master_categories_id
is where the product's category-description comes from, this makes immense sense!
I'll do the same for the previous 'bit', checking for the GPSF_POS_CATEGORIES
.
Not that I use this, but as an example, for a feed of one product, with a p2c table of 387232 entries, feed generation goes from 0 to 14 seconds (on a local pc).
I changed
$where .= ' AND p2c.categories_id NOT IN (' . GPSF_NEG_CATEGORIES . ')';
to$where .= ' AND p.master_categories_id NOT IN (' . GPSF_NEG_CATEGORIES . ')';
and it was instant again.Also perhaps some sanitation/checking should be done on that constant....
You'll know soon enough if the various constants haven't been set correctly; sanitization would be a change over and above the performance-related fix that'll be in this correction.
Not that I use this, but as an example, for a feed of one product, with a p2c table of 387232 entries, feed generation goes from 0 to 14 seconds (on a local pc).
I changed
$where .= ' AND p2c.categories_id NOT IN (' . GPSF_NEG_CATEGORIES . ')';
to$where .= ' AND p.master_categories_id NOT IN (' . GPSF_NEG_CATEGORIES . ')';
and it was instant again.Also perhaps some sanitation/checking should be done on that constant....