From: Boris Z. <bz...@2b...> - 2004-09-12 11:40:43
|
Hi, I just upload Apache-PageKit-2.14_09-tt to http://eg.2bz.de/Apache-PageKit-2.14_09-tt.tar.gz. It works with the new mod_perl 1.9916 and libapreq2-2.04_03-dev. Also I add a downloadpage with very inclomplete discription of all recent versions at http://eg.2bz.de/download I wish a little more feedback on the Template-Toolkit extension - or does nobody use it currently? -- Boris |
From: Vlad <mar...@gm...> - 2004-09-13 14:54:46
|
Boris, I've installed last version of PgKit-TT you have posted here on my local server and came to a disappointing performance issues. I don't know is it tied to PageKit in general and not to TT extension (cause I didn't play with pgkit + native html templates), but here is the numbers: 1) page kit "homepage" showed me 35 requests per second 2) simple pure mod_perl handler that loads and expands TT template (with 2 included files and one simple cycle) - 330 rps I was considering PageKit as framework for my application, but those numbers, frankly, keeping me off... I understand that it's not valid to compare page expanded via pagekit with page expanded purely by TT, because there is a lot going on "behind the scene" in pagekit, but it still way too much - 10 times... also, something that I dind't quite understand is presence of PgKit tags which looks quite not like default TT tags in the code of your templates (taken from pgkit TT edition)... it looked to me like you are doing some "double" scans over each template, expanding internal page-kit related stuff and then giving the result to TT... if I guessed that correctly, perhaps this is the source of such "slowness"? Perhaps, this pre-parsing of a template it worth giving down to TT? thank you! p.s. btw, what are the changes in this last Apache-PageKit-2.14_09-tt.tar.gz compared to what you gave us to download several of week ago? On Sun, 12 Sep 2004 13:40:31 +0200, Boris Zentner <bz...@2b...> wrote: > Hi, > > I just upload Apache-PageKit-2.14_09-tt to > http://eg.2bz.de/Apache-PageKit-2.14_09-tt.tar.gz. > It works with the new mod_perl 1.9916 and libapreq2-2.04_03-dev. > > Also I add a downloadpage with very inclomplete discription of all > recent versions at > > http://eg.2bz.de/download > > I wish a little more feedback on the Template-Toolkit extension - or > does nobody use it currently? > > -- > Boris > > ------------------------------------------------------- > This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170 > Project Admins to receive an Apple iPod Mini FREE for your judgement on > who ports your project to Linux PPC the best. Sponsored by IBM. > Deadline: Sept. 13. Go here: http://sf.net/ppc_contest.php > _______________________________________________ > Pagekit-users mailing list > Pag...@li... > https://lists.sourceforge.net/lists/listinfo/pagekit-users > -- Vlad |
From: Boris Z. <bz...@2b...> - 2004-09-14 09:14:33
|
Hi Vlad, Am 13.09.2004 um 16:54 schrieb Vlad: > Boris, > > I've installed last version of PgKit-TT you have posted here on my > local server and came to a disappointing performance issues. I don't > know is it tied to PageKit in general and not to TT extension (cause I > didn't play with pgkit + native html templates), but here is the > numbers: > > 1) page kit "homepage" showed me 35 requests per second > > 2) simple pure mod_perl handler that loads and expands TT template > (with 2 included files and one simple cycle) - 330 rps > Thats slow, but the pagekit homepage use already a database and a lot of logic. It is not only expanding some stuff. First try to compare a real page or at least the same ;-). In the Config/Config.xml change reload = 'yes' to reload='no'. That speedup the application a bit. But now you can not change Config entries for the pages without restarting the server. Also the Cache is not checked for updated files ( this is not needed if your application is ready, but for develop you bertter leave it to 'yes'. Now remove as much as possible from Common::pkit_common_code. Or remove the whole sub. > I was considering PageKit as framework for my application, but those > numbers, frankly, keeping me off... I understand that it's not valid > to compare page expanded via pagekit with page expanded purely by TT, > because there is a lot going on "behind the scene" in pagekit, but it > still way too much - 10 times... On my Powerbook G4 1.5 a TT pagekit page *outpreforms* a native TT handler that delivers the same page! I do not have access to another test computer currently. .=--------+------=. | toolkit | con | |=--------+------=| | pkit | 84 | | tt | 28 | | ht | 95 | '=--------+------=' Here the results from a native TT handler: Concurrency Level: 10 Time taken for tests: 55.120 seconds Complete requests: 1500 Failed requests: 0 Broken pipe errors: 0 Total transferred: 5220000 bytes HTML transferred: 4905000 bytes Requests per second: 27.21 [#/sec] (mean) Time per request: 367.47 [ms] (mean) Time per request: 36.75 [ms] (mean, across all concurrent requests) Transfer rate: 94.70 [Kbytes/sec] received and here the same _with_ PageKit: Concurrency Level: 10 Time taken for tests: 17.885 seconds Complete requests: 1500 Failed requests: 0 Broken pipe errors: 0 Total transferred: 5202928 bytes HTML transferred: 4839444 bytes Requests per second: 83.87 [#/sec] (mean) Time per request: 119.23 [ms] (mean) Time per request: 11.92 [ms] (mean, across all concurrent requests) Transfer rate: 290.91 [Kbytes/sec] received ~ the same handler with HTML::Template Concurrency Level: 10 Time taken for tests: 15.753 seconds Complete requests: 1500 Failed requests: 0 Broken pipe errors: 0 Total transferred: 5200500 bytes HTML transferred: 4885500 bytes Requests per second: 95.22 [#/sec] (mean) Time per request: 105.02 [ms] (mean) Time per request: 10.50 [ms] (mean, across all concurrent requests) Transfer rate: 330.13 [Kbytes/sec] received this is the HTML::Template handler. sub ht : method { my $class = shift; my $r = shift; my $text = <<ENDE; <html> <body> <tmpl_include NAME="/tmp/template.tmpl"> <tmpl_var HOME> <tmpl_var path> <tmpl_var HOME> <tmpl_var path> <tmpl_var HOME> <tmpl_var path> <tmpl_var HOME> <tmpl_var path> <tmpl_var HOME> <tmpl_var path> <tmpl_var HOME> <tmpl_var path> <tmpl_var HOME> <tmpl_var path> <tmpl_var HOME> <tmpl_var path> <tmpl_var HOME> <tmpl_var path> <tmpl_var HOME> <tmpl_var path> <tmpl_include NAME="/tmp/template.tmpl"> </body> </html> ENDE my $pkit_root = '/Users/borisz/src/c/aq/Apache-PageKit-2.14_09-tt/eg'; my $dbh = DBI->connect_cached( "dbi:SQLite:dbname=$pkit_root/dbfile", "", "" ) || die "$DBI::errstr"; my $template = HTML::Template->new( scalarref => \$text ); $template->param( HOME => $ENV{HOME} ); $template->param( PATH => $ENV{PATH} ); print "Content-Type: text/html\n\n", $template->output; return Apache::OK; } I have tested with apaches ab 1.3 inside the same server as pagekit live with this handler. The file template.tt2 holds ########## template.tt2 ######### [% HOME %] [% PATH %] [% HOME %] [% PATH %] [% HOME %] [% PATH %] [% HOME %] [% PATH %] [% HOME %] [% PATH %] [% HOME %] [% PATH %] [% HOME %] [% PATH %] [% HOME %] [% PATH %] [% HOME %] [% PATH %] [% HOME %] [% PATH %] ############################# <Perl> sub tt : method { my $class = shift; my $r = shift; my $text = <<ENDE; <html> <body> Template<br> [% INCLUDE template.tt2 %] [% HOME %] [% PATH %] [% HOME %] [% PATH %] [% HOME %] [% PATH %] [% HOME %] [% PATH %] [% HOME %] [% PATH %] [% HOME %] [% PATH %] [% HOME %] [% PATH %] [% HOME %] [% PATH %] [% HOME %] [% PATH %] [% HOME %] [% PATH %] [% INCLUDE template.tt2 %] </body> </html> ENDE # open the html template my $template = Template->new( INCLUDE_PATH => '/tmp' ); my $o = ''; $template->process( \$text, { HOME => $ENV{HOME}, PATH => $ENV{PATH} }, \$o ) || die $template->error(); # send the obligatory Content-Type and print the template output print "Content-Type: text/html\n\n", $o; return Apache::OK; } </Perl> <Location /test/tt> SetHandler perl-script PerlHandler MyTest::Handler->tt </Location> > also, something that I dind't quite understand is presence of PgKit > tags which looks quite not like default TT tags in the code of your > templates (taken from pgkit TT edition)... it looked to me like you > are doing some "double" scans over each template, expanding internal > page-kit related stuff and then giving the result to TT... if I > guessed that correctly, perhaps this is the source of such "slowness"? No, at least not at all, most often the database access is the slowest part. General the best you can do is put as much as possible into components and content. That is as fast as directly typed into the page. Use a fast database. DBD::SQLite in a recent version is a lot faster on concurent access so use the lastest. But keep in mind that recently DBD::SQLite switch from version 2 to 3 and both are incompatible. So update only if your data is on a backup. For larger datasets and more SQL futures I recommend postgres. > Perhaps, this pre-parsing of a template it worth giving down to TT? > The templates are in a real precached format, faster as generated from tt so until there is no error in the code, that part is faster than tt itself. Watch them in the pkit_cache directory with strings View/pkit_cache/somefile. > > thank you! > > p.s. btw, what are the changes in this last > Apache-PageKit-2.14_09-tt.tar.gz compared to what you gave us to > download several of week ago? > the file eg/dbfile is not in the Apache-PageKit-2.14_09-tt.tar.gz tarfile, since this is in the old DBD::SQLite format and you get some errors if you use a version 3 format. The fix is to delete the file. And more important mod_perl and libapreq2 have changed again. This version work _only_ with the newer mod_perl. -- Boris |
From: R K <lin...@ho...> - 2004-09-14 12:21:04
|
Boris Zentner wrote: > Hi, > > I just upload Apache-PageKit-2.14_09-tt to > http://eg.2bz.de/Apache-PageKit-2.14_09-tt.tar.gz. > It works with the new mod_perl 1.9916 and libapreq2-2.04_03-dev. I was curious if there is any release for httpd ver 1.3.x and the supporting mod_perl. Thanks -RK |
From: R K <lin...@ho...> - 2004-09-14 12:43:00
|
R K wrote: > Boris Zentner wrote: > >> Hi, >> >> I just upload Apache-PageKit-2.14_09-tt to >> http://eg.2bz.de/Apache-PageKit-2.14_09-tt.tar.gz. >> It works with the new mod_perl 1.9916 and libapreq2-2.04_03-dev. > > > I was curious if there is any release for httpd ver 1.3.x and the > supporting mod_perl. I will explain in further details, since the mail did not really state my problem. I would like to use Apache 1.3.x series server with mod_perl verision 1.29, now I was wondering if the release will work with my desired combination? I would like to point out one problem that I was facing, I could not find out Apache::test library, but yes Apache::Test library was available. Is there some problem here? Since setup_eg.pl didnt work correctly. Here is the output: Can't locate Apache/test.pm in @INC (@INC contains: /tmp/.my_linux_box/local/lib/perl5/5.8.2/i686-linux /tmp/.my_linux_box/local/lib/perl5/5.8.2 /tmp/.my_linux_box/local/lib/perl5/site_perl/5.8.2/i686-linux /tmp/.my_linux_box/local/lib/perl5/site_perl/5.8.2 /tmp/.my_linux_box/local/lib/perl5/site_perl .) at setup_eg.pl line 11. BEGIN failed--compilation aborted at setup_eg.pl line 11. -RK |
From: Shimon R. <sh...@ru...> - 2004-09-14 12:51:51
|
RK, PageKit for Apache 1.3 is available and the current version is 1.14 (the 1.x versions aren't old, they're just for Apache/mod_perl 1.x). You can find it on CPAN or Pagekit.org. Enjoy! shimon. On Tue, Sep 14, 2004 at 05:50:45PM +0530, R K wrote: > Boris Zentner wrote: > > >Hi, > > > >I just upload Apache-PageKit-2.14_09-tt to > >http://eg.2bz.de/Apache-PageKit-2.14_09-tt.tar.gz. > >It works with the new mod_perl 1.9916 and libapreq2-2.04_03-dev. > > I was curious if there is any release for httpd ver 1.3.x and the > supporting mod_perl. > > Thanks > -RK > > > ------------------------------------------------------- > This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170 > Project Admins to receive an Apple iPod Mini FREE for your judgement on > who ports your project to Linux PPC the best. Sponsored by IBM. > Deadline: Sept. 13. Go here: http://sf.net/ppc_contest.php > _______________________________________________ > Pagekit-users mailing list > Pag...@li... > https://lists.sourceforge.net/lists/listinfo/pagekit-users |
From: Boris Z. <bo...@id...> - 2004-09-14 14:05:54
|
Hi, As Shimon pointed out already, Apache-PageKit-1.14 is the right version to use. Am Dienstag, 14. September 2004 14:42 schrieb R K: > R K wrote: > available. Is there some problem here? Since setup_eg.pl didnt work > correctly. > Here is the output: > > Can't locate Apache/test.pm in @INC (@INC contains: > /tmp/.my_linux_box/local/lib/perl5/5.8.2/i686-linux > /tmp/.my_linux_box/local/lib/perl5/5.8.2 > /tmp/.my_linux_box/local/lib/perl5/site_perl/5.8.2/i686-linux > /tmp/.my_linux_box/local/lib/perl5/site_perl/5.8.2 > /tmp/.my_linux_box/local/lib/perl5/site_perl .) at setup_eg.pl line 11. > BEGIN failed--compilation aborted at setup_eg.pl line 11. > Whops, the setup_eg.pl is just a old file. It is without function for recent Apache::PageKit. Just ignore or delete it. The setup task is done by make test currently. cd Apache-PageKit-1.14 perl Makefile.PL make make test make install then do a ./t/TEST -start-httpd and browse http://localhost:8529/ to stop the server do ./t/TEST -stop-httpd |
From: R K <lin...@ho...> - 2004-09-15 04:42:49
|
Boris Zentner wrote: >Hi, > >As Shimon pointed out already, Apache-PageKit-1.14 is the right version to >use. > > But I was wondering if the latest Template Toolkit support is added to this release? I am very much interested in using the TT part of A::P. Thanks -RK |
From: Boris Z. <bo...@id...> - 2004-09-15 11:34:21
|
Hi RK, Am Mittwoch, 15. September 2004 06:42 schrieb R K: > Boris Zentner wrote: > >Hi, > > > >As Shimon pointed out already, Apache-PageKit-1.14 is the right version to > >use. > > But I was wondering if the latest Template Toolkit support is added to > this release? I am very much interested in using the TT part of A::P. > No, currently Apache-PageKit-1.14 has no support for TT. But I plan to backport the TT extension once most people agree with the patch. I do not use TT. -- Boris |