Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
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
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
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
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
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
#24 2004-09-07 00:26:23
- hafnius
- Archived Plugin Author

- From: DK
- Registered: 2004-09-02
- Posts: 47
Re: ... improve my run-time?
I also tried turning logging off and my rund time is now around 0.02xx – 0.03xx thanks all for a great forum !
/Klaus b
– Nobody puts Baby in the corner !
Johnny Castle, Dirty Dancing
Offline
#25 2005-11-05 13:49:11
- Jaro
- Member

- From: S/F
- Registered: 2004-11-18
- Posts: 89
Re: ... improve my run-time?
Hi guys,
I’ve tried turning the logging off but it has no effect on runtime. My runtime is between 3 – 4 seconds. The site is very slow. Textpattern is installed on a university server what I guess might have some impact on a performance (some security issues maybe?). Although there are other sites which load very fast – those are static HTML sites that don’t use any CMS I guess.
MySQL database is installed on a different server (Dreamhost). I have several databases installed there but don’t have a performance problem with any of them.
URL of the site is http://www.uta.fi/~sanna.harakkamaki/. Does anyone know where should I start to look for a solution?
EDIT: I turned off the plugins I use but it has no effect on runtime.
Last edited by Jaro (2005-11-05 13:52:01)
Offline
Re: ... improve my run-time?
Textpattern is installed on a university server
MySQL database is installed on a different server (Dreamhost).
The distance between the two servers might be a reason for the slowness. Is there a specific reason why you didn’t install textpattern on Dreamhost?
Something against the syptoms might be the asy_jpcache plugin, but it will only affect part of your pageviews (the cache-hits).
Offline
#27 2005-11-05 14:40:54
- Jaro
- Member

- From: S/F
- Registered: 2004-11-18
- Posts: 89
Re: ... improve my run-time?
I installed it on a university server because I want the site to have the university URL. There are many lists and databases of students which have already this URL http://www.uta.fi/~sanna.harakkamaki/. (do I make sense with my english?)
Offline
#28 2005-11-05 22:17:59
- zem
- Developer Emeritus

- From: Melbourne, Australia
- Registered: 2004-04-08
- Posts: 2,579
Re: ... improve my run-time?
You should be able to reduce runtime delays without disabling logging by setting “Use DNS” to “No” in admin > preferences > advanced.
(edit) – whoops, I missed a bit. Running MySQL and Textpattern on separate networks is the cause here. Every time Textpattern displays a page, it accesses the MySQL server. If they’re on separate machines on the same local network, with a fast LAN connection, the performance hit can be minimal. But, across the open internet, I’d expect delays similar to those you’re experiencing.
Alex
Offline
#29 2005-11-05 23:47:18
- zem
- Developer Emeritus

- From: Melbourne, Australia
- Registered: 2004-04-08
- Posts: 2,579
Offline