Re: Diazo performance problem

Гирман Богдан <[email protected]>
Newsgroups gmane.comp.web.zope.plone.devel
Message-ID <CAPR+16k=pvUsT_AAbV1+m1UWs2vJigx9TSjJmAbA6jz=3rH24A@mail.gmail.com>
Dear Mauro,

I run it as bin/instance fg and bin/instance start.

I see that compiler runs every time in two cases and it is strage.
I tried to check differences between returned results 'compiled_doc' and
see that there is not any difference.

I know that compiler runs every time in DevelopmentMode but in my case it
runs over and over.

Best regards,
Bogdan.


2014-02-04 Mauro Amico <[email protected]>:

>  With similar problem I've compiled xlst using diazocompiler (
> http://docs.diazo.org/en/latest/compiler.html) and made some tests using
> diazorun. In my case the problem was a complicated xpath condition and too
> huge xlst file.
>
> Are you running zope in console or run mode, not foreground, right? In
> foreground the diazo to xlst compilation are not cached....
>
> Mauro.
>
>
> On 02/04/2014 03:08 PM, Domen Kožar wrote:
>
> Hi Bogdan,
>
>  I'd recommend using RunSnakeRun
> http://www.vrplumber.com/programming/runsnakerun/ and see if there is
> some space for optimizations.
>
>  lpd
>
>
> On Tue, Feb 4, 2014 at 3:06 PM, Гирман Богдан <[email protected]>wrote:
>
>> Hi,
>>
>> I'm investigating a performance issues with diazo.
>> With diazo enabled my site loads two times slower than without diazo.
>>
>> For testing I use apache benchmark and ZopeProfiler.
>> I run 100 request for the front-page *with diazo* enabled and get from
>> ZopeProfiler:
>>
>>    ncalls  tottime  percall  cumtime  percall filename:lineno(function)
>>       900   21.015    0.023   21.019    0.023 /home/bogdan/.buildout/eggs/diazo-1.0.4-py2.7.egg/diazo/utils.py:59(__call__)
>> 1057912/934100    1.825    0.000    5.994    0.000 {getattr}
>>       100    1.661    0.017   29.061    0.291 /home/bogdan/.buildout/eggs/plone.app.theming-1.0.4-py2.7.egg/plone/app/theming/transform.py:200(transformIterable)
>>
>> Diazo takes about half of all time for the servicing request.
>> ab output:
>>
>> Server Software:        Zope/(2.13.21,
>> Server Hostname:        localhost
>> Server Port:            8080
>>
>> Document Path:          /Plone/
>>
>>
>> Document Length:        36403 bytes
>>
>> Concurrency Level:      1
>> Time taken for tests:   58.157 seconds
>> Complete requests:      100
>> Failed requests:        0
>> Write errors:           0
>> Total transferred:      3686300 bytes
>>
>>
>> HTML transferred:       3640300 bytes
>> Requests per second:    1.72 [#/sec] (mean)
>> Time per request:       581.567 [ms] (mean)
>> Time per request:       581.567 [ms] (mean, across all concurrent requests)
>> Transfer rate:          61.90 [Kbytes/sec] received
>>
>>
>>
>> Connection Times (ms)
>>               min  mean[+/-sd] median   max
>> Connect:        0    0   0.0      0       0
>> Processing:   529  581  36.8    574     693
>> Waiting:      492  576  37.8    569     692
>> Total:        529  581  36.8    574     693
>>
>>
>>
>> Percentage of the requests served within a certain time (ms)
>>   50%    574
>>   66%    593
>>   75%    608
>>   80%    612
>>   90%    629
>>   95%    667
>>   98%    682
>>   99%    693
>>  100%    693 (longest request)
>>
>>
>>
>> I run 100 request for the front-page *without diazo* enabled:
>> ab output:
>>
>> Server Software:        Zope/(2.13.21,
>> Server Hostname:        127.0.0.1
>> Server Port:            8080
>>
>> Document Path:          /Plone/
>> Document Length:        33387 bytes
>>
>> Concurrency Level:      1
>> Time taken for tests:   27.629 seconds
>> Complete requests:      100
>> Failed requests:        0
>> Write errors:           0
>> Total transferred:      3384700 bytes
>> HTML transferred:       3338700 bytes
>> Requests per second:    3.62 [#/sec] (mean)
>> Time per request:       276.294 [ms] (mean)
>> Time per request:       276.294 [ms] (mean, across all concurrent
>> requests)
>> Transfer rate:          119.63 [Kbytes/sec] received
>>
>> Connection Times (ms)
>>               min  mean[+/-sd] median   max
>> Connect:        0    0   0.0      0       0
>> Processing:   258  276  24.7    271     382
>> Waiting:      224  272  24.2    267     381
>> Total:        258  276  24.7    271     382
>>
>> Percentage of the requests served within a certain time (ms)
>>   50%    271
>>   66%    273
>>   75%    275
>>   80%    277
>>   90%    289
>>   95%    366
>>   98%    380
>>   99%    382
>>  100%    382 (longest request)
>>
>> Also I seeing that running 100 requests with ab
>> "diazo/utils.py:59(__call__)" get called 900 times, is it right?
>>
>>    ncalls  tottime  percall  cumtime  percall filename:lineno(function)
>>       900   21.015    0.023   21.019    0.023 /home/bogdan/.buildout/eggs/diazo-1.0.4-py2.7.egg/diazo/utils.py:59(__call__)
>> 1057912/934100    1.825    0.000    5.994    0.000 {getattr}
>>       100    1.661    0.017   29.061    0.291 /home/bogdan/.buildout/eggs/plone.app.theming-1.0.4-py2.7.egg/plone/app/theming/transform.py:200(transformIterable)
>>
>>
>> I have tested it in foreground mode and in usual mode but the difference
>> in two times between diazo theme enabled and without diazo still present.
>>
>> Best regards,
>> Bogdan.
>>
>>
>> ------------------------------------------------------------------------------
>> Managing the Performance of Cloud-Based Applications
>> Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
>> Read the Whitepaper.
>>
>> http://pubads.g.doubleclick.net/gampad/clk?id=121051231&iu=/4140/ostg.clktrk
>> _______________________________________________
>> Plone-developers mailing list
>> Plone-developers-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
>> https://lists.sourceforge.net/lists/listinfo/plone-developers
>>
>>
>
>
> ------------------------------------------------------------------------------
> Managing the Performance of Cloud-Based Applications
> Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
> Read the Whitepaper.http://pubads.g.doubleclick.net/gampad/clk?id=121051231&iu=/4140/ostg.clktrk
>
>
>
> _______________________________________________
> Plone-developers mailing listPlone-developers-5NWGOfrQmneRv+LV9MX5ugtCRVl27V+i0wdF1cv0I5s@public.gmane.org://lists.sourceforge.net/lists/listinfo/plone-developers
>
>
>
>
> ------------------------------------------------------------------------------
> Managing the Performance of Cloud-Based Applications
> Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
> Read the Whitepaper.
>
> http://pubads.g.doubleclick.net/gampad/clk?id=121051231&iu=/4140/ostg.clktrk
> _______________________________________________
> Plone-developers mailing list
> Plone-developers-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
> https://lists.sourceforge.net/lists/listinfo/plone-developers
>
>

------------------------------------------------------------------------------
Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121051231&iu=/4140/ostg.clktrk

_______________________________________________
Plone-developers mailing list
Plone-developers-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
https://lists.sourceforge.net/lists/listinfo/plone-developers
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.