[ic] Too very slow pages on ic 5.10.0

marco m.mescoli at omnib.it
Mon Mar 12 16:18:11 UTC 2018


Il 12/03/2018 04:30, Andrew Baerg ha scritto:
> On 2018-03-11 12:51 PM, Peter wrote:
>> On 11/03/18 01:44, marco wrote:
>>> after 3 months of installation and light use my old production catalogue
>>> with:
>>
>>> I notice that for the pages with heavy query became very slow and
>>> sometimes bring to "Gateway Timeout"
>>> "top" utility display cpu to 100% during page wait sometimes for mysql
>>> and sometimes for interchange
>>
>> You need to benchmark the code on the problematic pages and find out
>> exactly which lines or blocks of code are causing the issue.
>>
>> This is most likely going to be the result of lots of DB hits from some
>> very inefficient code.  Look for calls to [data] or [field], or similar
>> tags that waste db hits inside of a [loop] or similar.  Rewrite your
>> code so that it does a single query to the db to get all the data you
>> need instead and it will end up being way more efficient.
>>
>
> Totally agree with this.
>
> Also, if you are processing large queries with [query sql="..." type=list] ... [/query], consider using the hashref option [query sql="..." hashref="foo"][/query] and then processing the output in a calc block:
>
> [calc]
>    foreach $line (@{$Tmp->{foo}}) {
>      ....
>    }
> [/calc]
>
> I have seen page load times go from seconds to milliseconds using this strategy.
>
> Not sure if it applies to the OP's situation, but I seem to remember having some pages that were processing large amounts of data using [query type=list] really slow down on newer Perls with UTF8 enabled in the DBD::Pg driver.
>
> cheers,
>
> Andrew

My code ? I am sure is inefficient code ;-) but is about 10/15 years 
that is running with different mix of os, perl, ic and mysql version ... 
the problem in not my dirty code but why this dirty code run so slow in 
the last (5.10.0) ic version.

Maybe my enviro configuration issue, seems a mysql/mariaDb problem bound 
to utf8 encoding.

Strange behavior: pages slow very down only from the second/third 
different mysql query.

-- 
"Fino alla bara sinpara"
"Up to demise we rize"



More information about the interchange-users mailing list