Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#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
Few questions:
What does the value of Memory mean?
Also when do i have to worry about my Runtime?
Thanks
Offline
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
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
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
Offline
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
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
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
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
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