[ic] flypage / IC efficiency?
jon at endpoint.com
Mon Sep 19 18:26:36 UTC 2016
On Sat, 17 Sep 2016, IC wrote:
> Then in Track.pm (sub view_product) it gets the description and category
> (why?), when it does this though it checks again the sku exists each
> time, so that's another 4 queries.
You can disable that with `UserTrack no` in your catalog.cfg. Almost
nobody uses the UserTrack feature and it defaults to off in core and in
the Strap catalog template.
> Then each time an [item] tag is used or an [if-item] not only does it
> generate a query for the tag it checks if the sku exists every time, so
> if you have 20 [item] tags you get a further pointless 20 'select sku'
> queries, this is why the strap and standard flypage generate over 30
> queries for a single product view.
> The IC core is highly inefficient, it generates 2 mysql queries for
> every item tag.
> I don't know what the best fix for this is?
As I mentioned in a previous email in this thread, don't use the
[item-field] tag. It does a new SQL query for every invocation by design;
that's just not the tag you should use. I wrote before:
> You can rework the flypage to use a [query] tag to fetch whatever you
> want in a single query and then use [sql-param] to access the values
> without any further hits to the database.
End Point Corporation
More information about the interchange-users