Re: Handling Translations



First of all use of straight gettext in the website is very easy.  You can
just make a gettext call for every variable register call we do for the
templates.

To use templates correctly we will want to try to remove all html from the
strings we register which should break the strings down into paragraph size
blocks.

Currently i have an xml system setup to hold and automatically register
these strings, i think this is a nice way of handling this but it isn't
needed in anyway, the register calls can all be coded in for each page, the
syntax for smarty is easy and straight forward and i don't see any problems
with this.

Also i don't see any real speed problems with any system where the main
basis is the Smarty template engine.  The smarty template engine can cache
the output from its forms, so we don't need to come up with any new
techonology for pre-pagination of gettext based pages, we have that already
i just have to turn it on.

I'm not trying to create anything really complex here, i just basing the
pages on the fastest and must featureful template engine available for php
(this is my opinion).  I tried to setup some framework around it to make the
management of this easier but if your worried about speed we can take that
out too.

Anyway here is a quick benchmark of what i have setup currently on my box.
Smarty Templates (with no output caching) with Variables being registered
from xml files (3 files in this case 2 for menus and 1 for page content)

[jeichorn tux bin]$ ./ab -c 50 -n 500
http://localhost/gnome.joshuaeichorn.com/This is ApacheBench, Version 1.3c <$Revision: 1.45 $> apache-1.3
Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Copyright (c) 1998-2000 The Apache Group, http://www.apache.org/

Server Software:        Apache/1.3.20
Server Hostname:        localhost
Server Port:            80

Document Path:          /gnome.joshuaeichorn.com/
Document Length:        4039 bytes

Concurrency Level:      50
Time taken for tests:   42.237 seconds
Complete requests:      500
Failed requests:        0
Total transferred:      2135232 bytes
HTML transferred:       2051412 bytes
Requests per second:    11.84
Transfer rate:          50.55 kb/s received

Connnection Times (ms)
min   avg   max
Connect:        0    60   675
Processing:   684  4007  5268
Total:        684  4067  5943

Same thing with cache turned on.
[jeichorn tux bin]$ ./ab -c 50 -n 500
http://localhost/gnome.joshuaeichorn.com/This is ApacheBench, Version 1.3c <$Revision: 1.45 $> apache-1.3
Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Copyright (c) 1998-2000 The Apache Group, http://www.apache.org/

Server Software:        Apache/1.3.20
Server Hostname:        localhost
Server Port:            80

Document Path:          /gnome.joshuaeichorn.com/
Document Length:        4039 bytes

Concurrency Level:      50
Time taken for tests:   22.850 seconds
Complete requests:      500
Failed requests:        0
Total transferred:      2148244 bytes
HTML transferred:       2063929 bytes
Requests per second:    21.88
Transfer rate:          94.02 kb/s received

Connnection Times (ms)
min   avg   max
Connect:        0    34   384
Processing:   393  2166  2718
Total:        393  2200  3102

My machine is a pII450 with 384meg of ram, and a 30gig ibm ide harddrive.
I'm not horrible happy with the speedup you get from the included caching
solution in the smarty engine you get 1.84 times the requests per second
serviced which i don't think is that great in my book.  Since a plain static
html of the smae content can be served at 640 requests per second.  But i
can write my own caching system that has suitable performance.

Anyway back to relaxing for the weekend i'll look into different technical
details on tuesday.

-joshua eichorn








[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]