forrest-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Cyriaque Dupoirieux <Cyriaque.Dupoiri...@pcotech.fr>
Subject Re: Quick way to skin php-files?
Date Thu, 01 Dec 2005 12:57:50 GMT
Ross Gardler a écrit :

> Cyriaque Dupoirieux wrote:
>
>> Cyriaque Dupoirieux a écrit :
>>
>>> Ross, I have to go now, I'll be back on thursday...
>>> Thank you for your help,
>>>
>>> Cyriaque,
>>>
>>>
>>>
>>> Ross Gardler a écrit :
>>>
>>>> Cyriaque Dupoirieux wrote:
>>>>
>>>>> Ferdinand Soethe a écrit :
>>>>>
>>>>>>> This is untested, but would be where I would start experimenting

>>>>>>> and I'm
>>>>>>> pretty sure is close to correct (maybe even correct ;-).
>>>>>>>  
>>>>>>
>>>>>>
>>>>>> Thanks Ross, that was exactly what I was looking for. I just didn't
>>>>>> know where to intercept. Will give it a try right away ...
>>>>>>
>>>>> Hi,
>>>>>
>>>>>    I made this in my php pipeline :
>>>>>  <map:pipeline>
>>>>>
>>>>>    <!-- PHP Documentation -->
>>>>>    <map:match type="regexp" pattern="^(.*?)([^/]*).php$">
>>>>>      <map:generate src="cocoon://{1}{2}.html"/>
>>>>>      <map:transform 
>>>>> src="resources/stylesheets/php/document2php.xsl"/>
>>>>>      <map:serialize type="html"/>
>>>>>    </map:match>
>>>>
>>>>
>>>> What does document2php.xsl do? Is this appraoch better for 
>>>> Ferdinand than the one I suggest?
>>>
>>>
>> It just transform the <php> and </php> tags into *<?php* and *?>*...
>> In fact, I have created an output plugin for php format.
>> This plugin match php extension file in order to generate the skinned 
>> HTML and clean the <php> and </php> tags between which I put php calls.
>>
>> On the paper it was simple, my problem is the horible performance I 
>> get to generate the skinned HTML.
>> With the Cocoon Profile I get :
>> 1     file /src=/cocoon://livres/livres.html     3031     3031     3031
>> 2     xslt /src=/resources/stylesheets/php/document2php.xsl     
>> 46     46     46
>>
>> to get a php file whereas it takes arround 100 to get a "normal" 
>> skinned HTML page...
>
>
> I don't understand how this can be the case since an internal request 
> for "cocoon://{1}{2}.html" is identical to a client request for 
> http://localhost/{1}/{2}.html
>
> Your output from the profiler above shows only 46ms for document2php.xsl.

I know that my stylesheet - document2php.xsl - is fast enough, it has a 
single pattern to match...
My problem is with the 3031ms ! to generate the HTML file before the 
<php> tag cleanning !

>
> Are you sure you are comparing like with like?

No ;-) ,

>
> Ross
>
>

Mime
View raw message