Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#13 2004-07-27 07:12:52

Damelon
Member
From: Lyon, France
Registered: 2004-05-11
Posts: 47
Website

Re: ... improve my run-time?

> Remillard wrote:
> PS: SDF for these purposes stands for “Super Dimensional Fortress”. The guys who started it were gamers I believe :). Not sure what it stands for in France.

I’m guessing. Perhaps Dean is referring to Front Social Démocrate which goes by the acronym SDF (although, in a way this makes no sense), or I suppose he could also have had a nasty run-in with the Scouts de France which also use it. ;)

I know, I know : Sans domicile fixe or the homeless

Did I miss the SDF in question Dean?

Last edited by Damelon (2004-07-27 07:27:05)

Offline

#14 2004-07-27 13:44:10

tyler
New Member
From: Toronto the Good
Registered: 2004-04-12
Posts: 4
Website

Re: ... improve my run-time?

Where are you guys getting the runtime numbers?

I had excessive runtimes (it’s still slower than what I’d like) and noticed that the default page and section pages were slower than pulling up individual articles. After experimenting I found that the biggest determinants were
a) number of latest articles and
b) number of conditional if statements (hardcoded or in plugins).

Reducing both decreased runtimes. Instead of using conditional or $global if statements I have increased the number of sections to ~20, which is high but faster than “if section” type queries.

Database size, size of the htaccess file & number of sections don’t seem to be as important as a) & b) above.

Last edited by tyler (2004-07-27 13:45:00)


I use this thing

Offline

#15 2004-07-27 18:47:12

reid
Member
From: Atlanta, Ga.
Registered: 2004-04-04
Posts: 224
Website

Re: ... improve my run-time?

Tyler, “View Source” and look at the very last line. On your home page, it says “Runtime: 4.8852.”

Using TXP on TextDrive, I’ve never seen a runtime on my home page of more than 0.25 seconds. It’s usually in the range of 0.12 to 0.18.


TextPattern user since 04/04/04

Offline

#16 2004-07-27 19:01:03

tyler
New Member
From: Toronto the Good
Registered: 2004-04-12
Posts: 4
Website

Re: ... improve my run-time?

4.8852? …that su…., um, thats horrible
I’m getting 2.5-3.4. Not good.

Was that another TXD plug? :o)


I use this thing

Offline

#17 2004-07-27 23:14:58

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

Re: ... improve my run-time?

The biggest factor I found in run time was the DNS lookup in the logging code.

To those experiencing long runtime delays: try temporarily turning the logging feature off. If that makes a significant difference, you might consider changing line 18 of publish/log.php from this:

<code>$out[‘ip’] = @gethostbyaddr($_SERVER[‘REMOTE_ADDR’]);</code>

to this:

<code>$out[‘ip’] = $_SERVER[‘REMOTE_ADDR’];</code>

..to disable the DNS lookup in the logging code.

If you’ve made that edit and you really want to see host names in the logs rather than IP addresses, change line 73 of include/txp_log.php from this:

<code>td($host),</code>

to this:

<code>td(@gethostbyaddr($host)),</code>

Last edited by zem (2004-07-27 23:23:59)


Alex

Offline

#18 2004-07-28 03:29:32

Daragh
Member
From: Toronto Canada
Registered: 2004-05-26
Posts: 60
Website

Re: ... improve my run-time?

This runtime thing is curious. I was puzzled to see my main page was taking 5 seconds, then 0.17, then 15 seconds, when trying it from work. Whereas here at home, I can’t make it go longer than 0.2. Whaddup with that? Also, zem, what does your second optimization do?

Offline

#19 2004-07-28 04:15:33

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

Re: ... improve my run-time?

<strike>The index speeds up the queries used by txp:article and similar that retrieve multiple posts sorted by date. I saw queries drop from a several second average down to negligible times after adding the index. It probably won’t make much of a difference unless your posts number in the thousands, but certainly won’t hurt. I don’t know why there isn’t an index on that field by default.</strike>

It is there by default. Don’t mind me.

The unpredictable times you describe sound to me like DNS lookup delays. I’d be interested to hear if you still get those delays from work with logging turned off.

Last edited by zem (2004-07-28 04:58:05)


Alex

Offline

#20 2004-07-28 14:54:49

Daragh
Member
From: Toronto Canada
Registered: 2004-05-26
Posts: 60
Website

Re: ... improve my run-time?

Rats, I didn’t read this in time to try it today, but I’ll give it a go tomorrow. Connection seems pretty slow in general, so you’re probably right.

Offline

#21 2004-07-30 22:04:44

Daragh
Member
From: Toronto Canada
Registered: 2004-05-26
Posts: 60
Website

Re: ... improve my run-time?

I turned logging off, and it worked like a charm. I’m going to make that hack you suggested, zem, as I love the up-to-the-minit logging thing. Thanks for the pointer!

Offline

#22 2004-08-02 23:10:59

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

Re: ... improve my run-time?

Pomoinc,

That’s far more likely to be a problem with your local machine or network than with Textpattern.

Again, I’ll suggest to those experiencing runtime delays: turn off logging, and see if it makes a difference. If it does, post the before and after times in this thread.

To see the runtime, load your front Textpattern page, view the source, and scroll to the bottom.


Alex

Offline

#23 2004-08-02 23:18:24

jason
Member
From: USA
Registered: 2004-02-23
Posts: 85
Website

Re: ... improve my run-time?

The TextDrive site usually hovers around 0.01-0.02 (and with compression the html and css it fits one higher-speed TCP-IP packet).

There are a whole bunch of things one can do to get their stuff going really fast. Personally I think textpattern is one of the faster CMS/blog thingees around.

Offline

Board footer

Powered by FluxBB