Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2005-11-17 16:52:01

oldi
Member
Registered: 2005-10-14
Posts: 87

TXP runtime information in the source code

Recently i notice that TXP puts something like this in the end of the page

<code><!— Runtime: 0.0822 —>
<!— Queries: 32 —>
<!— Memory: 1805Kb, end of textpattern() —>
<!— txp tag trace: secondpass

—></code>

Few questions:

What does the value of Memory mean?

Also when do i have to worry about my Runtime?

Thanks

Offline

#2 2005-11-17 17:48:38

Jeremie
Member
From: Provence, France
Registered: 2004-08-11
Posts: 1,578
Website

Re: TXP runtime information in the source code

Memory is the quantity of RAM taken to generate the page.

Runtime is the time in second to do so… worry about it if it get to high (on a shared server, I say around half a second…).

Offline

#3 2005-11-17 17:59:49

Sencer
Archived Developer
From: cgn, de
Registered: 2004-03-23
Posts: 1,803
Website

Re: TXP runtime information in the source code

Memory is a rough approximation, made by polling with http://de.php.net/manual/en/function.memory-get-usage.php from time to time. It will be more accurate when production status is set to debugmode (since there is a slight performance hit for it).

What you really should be looking out for is whether the values vary a lot on certain pages. If some pages (e.g. due to plugins) have a lot higher values than other pages on the same site, this is an indicator to investigate.

Concrete values will differ from server to server.

Offline

#4 2005-11-17 20:43:59

oldi
Member
Registered: 2005-10-14
Posts: 87

Re: TXP runtime information in the source code

thanks for clarifying it.

So, more plugins —>more memory. I didn’t know that.

thanks

Offline

#5 2005-11-17 21:38:08

skoggy
Member
From: Westcoast of Sweden
Registered: 2005-03-27
Posts: 209
Website

Re: TXP runtime information in the source code

I´ve got 4.0.2 but it doesn´t generate these things… do I need a certain tag in my page, or?

Offline

#6 2005-11-17 21:49:54

zem
Developer Emeritus
From: Melbourne, Australia
Registered: 2004-04-08
Posts: 2,579

Re: TXP runtime information in the source code

FAQ


Alex

Offline

#7 2005-11-21 17:15:07

simonaut
Member
Registered: 2005-06-28
Posts: 16
Website

Re: TXP runtime information in the source code

Is there anyway to post the runtime information to the actual website, so I can say something like “it took XX queries to generate this page”
~Simon


Chat with me here!
AIM: s1monaut
http://www.simonaut.com/

Offline

#8 2005-11-21 18:51:08

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: TXP runtime information in the source code

I’m afraid not, the final calculation is done after the page is loaded (which is why it appears after </html>).

Offline

#9 2005-11-23 00:15:47

jdykast
Member
From: Tennessee
Registered: 2004-12-30
Posts: 119
Website

Re: TXP runtime information in the source code

What does the <code><!— txp tag trace: secondpass —></code> line indicate? I don’t remember seeing it until version 4.0.2 – is that correct?

Offline

#10 2005-11-23 10:28:22

Sencer
Archived Developer
From: cgn, de
Registered: 2004-03-23
Posts: 1,803
Website

Re: TXP runtime information in the source code

> What does the <!— txp tag trace: secondpass —> line indicate?
> I don’t remember seeing it until version 4.0.2 – is that correct?

Yes, it should have been only visible in debug-mode, but slipped through (no harm though).

It indicates the, well, second pass through the output.
Since the parser makes two passes, this will help with debugging in order to know which tags were parsed in which pass.

Offline

#11 2005-11-23 22:29:47

jdykast
Member
From: Tennessee
Registered: 2004-12-30
Posts: 119
Website

Re: TXP runtime information in the source code

Sorry about being slow to understand this here but I still have a couple of questions. I understand that the parser makes two passes through but what kind of information can be expected to show up in this area? Will there be specific tag names returned, or errors of some type? Currently, my tag trace area is empty with the exception of secondpass. Thanks.

Offline

#12 2005-11-24 07:41:19

Sencer
Archived Developer
From: cgn, de
Registered: 2004-03-23
Posts: 1,803
Website

Re: TXP runtime information in the source code

The tag-trace will only show in *debug*-production mode.“secondpass” is a divider to tell which of the tags were parsed before (firstpass) and after (secondpass). Due to a litttle oversight, this seperator appears even when no tagtrace is shown.

Also see: Posting a textpattern tag trace.

Offline

Board footer

Powered by FluxBB