Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2006-10-17 03:31:40

squaredeye
Member
From: Greenville, SC
Registered: 2005-07-31
Posts: 1,495
Website

txp:site_url draw on server?

How much will the <txp:site_url /> tag weigh on a server if used 10-20 times in one page load?
Anybody have any idea?


Offline

#2 2006-10-17 03:47:42

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

Re: txp:site_url draw on server?

Almost nothing. It won’t be fetched from the database 10-20 times, just once per page load.

Offline

#3 2006-10-17 03:56:34

squaredeye
Member
From: Greenville, SC
Registered: 2005-07-31
Posts: 1,495
Website

Re: txp:site_url draw on server?

Mary,
So the biggest loads on the db come from calls from plugins and <txp:article /> and <txp:article_custom /> ?

Is that right?


Offline

#4 2006-10-17 04:27:36

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

Re: txp:site_url draw on server?

In normal circumstances, yes, the article tags are the heaviest queries (though generally still quite efficient). You can see for yourself in Debugging mode with 4.0.4 – the tag trace shows the time taken for each SQL query.

My experience is that Textpattern SQL load usually isn’t a problem unless your server is marginal or overcrowded. The exception is when you use loops within loops – e.g. a tag that runs repeated queries, placed inside an article form that is in turn called repeatedly on an article list page, could cause thousands of queries per page view. That’s probably difficult to do with Textpattern’s built-in tags.


Alex

Offline

#5 2006-10-17 04:37:16

squaredeye
Member
From: Greenville, SC
Registered: 2005-07-31
Posts: 1,495
Website

Re: txp:site_url draw on server?

Mary, Alex,
thanks. That’s helpful to note. I’m doing a few different things trying to increase a wee bit of speed without ‘staticizing’ the site if it doesn’t need to be. I wanted to make sure I was on the right track and learn something along the way :)

Ta.


Offline

Board footer

Powered by FluxBB