[Silva-general] PTProfiler 1.2 Released, Updated for Five and Zope 2.10

Jonathan Bowlas j.bowlas at ucl.ac.uk
Fri Mar 30 15:09:43 CEST 2007


Hi Kit,

I'm gonna outline what I'm doing again, because I think we have our wires
crossed here.

I have a default silva installation with only 1 layout_macro.html stored at
the root.

I have created our own SilvaLayout Product or skin, which is what I'm using
to render the public view of the silva root. This does not reference
silva_32.png anywhere, nor does it reference the layout_macro.html in the
root.

When I clear the PTprofiler object I have added to my silva root and refresh
the public view homepage I do indeed see a number of calls to items I've
coded in my UCLDefaultLayout Skin. (See top section of calls_to_homepage.xsl
attached) However as you will see from the spreadsheet the greatest number
of calls are to standard_error_message which also has the longest rendering
time. 

So, when I click on this standard_error_message call to view the Profiled
results I get the results detailed in section 2 of calls_to_homepage.xsl
attached. (which includes references to silva_32.png, and other items not
found in my skin)

Next I tried deleting the layout_macro.html from my silva root and running
the PTProfiler again whilst refreshing the public view homepage but I still
get calls to standard_error_message however their total rendering time is
reduced from 0.3315s to 0.0338s. Viewing the profiled results for
standard_error_message again I can see that the number of calls have
considerably reduced however all of the remaining calls mentioned are
referenced from the standard_error_message template. (see section 3 of
calls_to_homepage.xsl attached)

So my questions are:

1) Why should standard_error_message be called at all when the public view
renders correctly? i.e without returning errors
2) Why does layout_macro.html get called when my SilvaLayout skin doesn't
reference it?
3) Why does deleting layout_macro.html in the root reduce the number of
calls to standard_error_message?

Hope this clarifies everything.

Cheers

Jon


-----Original Message-----
From: Kit BLAKE [mailto:kitblake at infrae.com] 
Sent: 29 March 2007 17:32
To: j.bowlas at ucl.ac.uk
Cc: 'silva-general'; ccaadgi at ucl.ac.uk
Subject: Re: [Silva-general] PTProfiler 1.2 Released, Updated for Five and
Zope 2.10

Hi Jon,
Then I don't understand which template you're profiling. In the first 
result set you sent I  see a call to a Silva logo (silva_32.png) and 
other metadata that I know are not in your site layout.

Also, that listing is not errors, it's calls. The two calls to:
python: error_type == 'NotFound'
are conditions in the s_e_m.

Try clearing PTProfiler and then hit a normal public page in your site. 
Then you'll see a bunch of expressions from the layout that should look 
familiar, because you coded them :-)

Kit

Jonathan Bowlas wrote:
> Hi Kit,
> 
> No this installation isn't using a default Silva layout, I've made a UCL
> branded SilvaLayout skin.
> 
> There's no mention of these errors in either the error_log or the
event.log.
> 
> I just noticed that deleting the layout_macro.html from my silva root
> reduces the number of errors to the 8, see attached. 
> 
> Cheers
> 
> Jon
> 
> -----Original Message-----
> From: Kit BLAKE [mailto:kitblake at infrae.com] 
> Sent: 29 March 2007 16:01
> To: j.bowlas at ucl.ac.uk
> Cc: 'silva-general'; ccaadgi at ucl.ac.uk
> Subject: Re: [Silva-general] PTProfiler 1.2 Released, Updated for Five and
> Zope 2.10
> 
> Hi Jon,
>> I've installed this product on our development server which works well,
> but
>> we seem to be getting a considerable number of calls to
>> standard_error_message, the profiled results for this can be seen in the
>> attached document (see standard_error_message.xls)
>>
>> Apologies for a lack of knowledge here but is there any chance someone
> could
>> explain what's going on (i.e. why so any calls to s_e_m)? But more
>> importantly should we be concerned? And what can be done to resolve this?
> 
> The PTProfiler result you sent looks like it's from a default Silva 
> installation on your dev server. By default I mean without your site's 
> layout. Is that the case?
> 
> Can you look in the error_log and find tracebacks for those errors? They 
> should be showing up with urls and tracebacks.
> 
> About the PTProfiler result you sent: if you have your s_e_m setup as it 
> is in a delivered Silva, it calls a macro in the layout_macro.html (the 
> nearest one in the hierarchy, but hopefully there's just one in your 
> site). So most of the calls are actually not in the s_e_m template, but 
> in the layout_macro. However in the one you sent, it looks to me like 
> it's calling the default (delivered) layout_macro, and that doesn't tell 
> me much. Except I wonder what the python: error_type != 'NotFound' is.
> 
> Kit
> 

-- 
?Kit BLAKE . Infrae . http://infrae.com/ + 31 10 243 7051
Hoevestraat 10 . 3033 GC . Rotterdam + The Netherlands
Contact = http://xri.net/=kitblake
-------------- next part --------------
A non-text attachment was scrubbed...
Name: calls_to_homepage.xls
Type: application/vnd.ms-excel
Size: 30208 bytes
Desc: not available
Url : http://lists.infrae.com/pipermail/silva-general/attachments/20070330/49ff4f25/attachment.xls 


More information about the Silva-general mailing list