Re: [mp2] strange behavior of script under heavy load
* Bjoern Hoehrmann wrote: The test input I'm using should yield in 102 reported errors. Under normal load, only 94 errors are reported (the last 8 errors are missing), under heavy load, sometimes, 102 erors are reported. I could track this down to input like !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.0 Transitional//EN nobr.../nobr This should result in an error 'element NOBR undefined' from OpenSP. When running it under mod_perl and the winnt mpm however it gives this message sometimes and 'document type does not allow element NOBR here' on other times. At some point I got different errors for every other request though it's not that stable anymore. It's not possible to reproduce this when using debug builds of OpenSP... This is the result of an unitialized variable in OpenSP. I've fixed it in the openjade cvs. Hopefully there aren't more gotchas of this kind. -- Björn Höhrmann · mailto:[EMAIL PROTECTED] · http://bjoern.hoehrmann.de Weinh. Str. 22 · Telefon: +49(0)621/4309674 · http://www.bjoernsworld.de 68309 Mannheim · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/
Re: web application speed problem with OO modules
Thanks for replying... I have done some profiling with Apache::DProfile, and this is the output of 'dprofpp tmon.out': Total Elapsed Time = 160.2141 Seconds User+System Time = 13.07412 Seconds Exclusive Times %Time ExclSec CumulS #Calls sec/call Csec/c Name 92.7 12.12 13.575 1 12.127 13.574 ELRes::ApacheHandler::handler 3.13 0.409 0.409 90360 0. 0. Date::Simple::as_iso 2.20 0.288 0.366 20364 0. 0. Params::Validate::_check_regex_fro m_xs 1.53 0.200 0.200 29966 0. 0. Date::Simple::DESTROY 1.35 0.177 0.177 6565 0. 0. Storable::mretrieve 0.66 0.086 0.086 36878 0. 0. Date::Simple::_compare 0.58 0.076 0.076 1761 0. 0. DBD::_::db::prepare_cached 0.46 0.060 0.060 24782 0. 0. Date::Simple::_add 0.32 0.042 0.042 2900 0. 0. ELRes::Entity::DESTROY 0.25 0.033 0.033 3700 0. 0. DBI::common::FETCH 0.18 0.023 0.023 3692 0. 0. DBI::st::fetch 0.12 0.016 0.016 1756 0. 0. ELRes::DB::DESTROY 0.08 0.011 0.011 9528 0. 0. Date::Simple::__ANON__ 0.08 0.010 0.010 1 0.0100 0.0100 DynaLoader::bootstrap 0.08 0.010 0.010 2 0.0050 0.0050 DBD::mysql::db::_login I doubt the ApacheHandler::handler subroutine runs that long, because it only shows the accumulated time used by other subroutines it calls. That makes the profile isn't really accurate. How do I make it to show the statistics of the subroutines called from the handler? Thank you... --- Badai Aqrandista Cheepy (?) From: Philip M. Gollucci [EMAIL PROTECTED] To: Badai Aqrandista [EMAIL PROTECTED] CC: modperl@perl.apache.org Subject: Re: web application speed problem with OO modules Date: Mon, 15 Aug 2005 00:32:09 -0400 (I only try to improve the speed of the code, so the use of proxy shouldn't be relevant here - I think, I could be wrong). You might try using Apache::DProf and/or Apache::SmallProf available here to see where your code is spending its time http://search.cpan.org/~fwiles/Apache-DB _ Low rate ANZ MasterCard. Apply now! http://clk.atdmt.com/MAU/go/msnnkanz003006mau/direct/01/ Must be over 18 years.
Re: is there a templating system that....
I messed around with Templating systems all weekend, and picked a winner Petal I wanted to go as simple as possible, and with the help of the list narrowed it down to: HTML::Tree HTML::Template Text::TagTemplate Petal HTML tree did exactly what I wanted it to, except I remembered as much as I know tree structures, working with Nevow's Stan formatting I learned to hate them HTML::Template got ruled out because the only way to get templates to render as xhtml valid is to use info as comments ie: TMPL_VAR NAME=PARAMETER_NAME isn't valid, but works TMPL_VAR NAME=PARAMETER_NAME / is valid, but doesn't work !-- TMPL_VAR NAME=PARAMETER_NAME -- is valid and works, but looks cluttered to me Text::TagTemplate almost worked right: #TAG NAME=VALUE works, isn't valid #TAG NAME=VALUE/ doesn't work, is valid #TAG NAME=VALUE / works, is valid (notice the space before the close of the tag) I didn't want to worry about remembering the space. The author sent me a copy of the next version that he will release which, with a new feature, will support what I want... ... But then i realized that the templates work and are valid, but don't look nice Petal templates do look nice, because span tal:replace=my_var/hello_world 'Jack'Hola, Mundo!/span is valid xhtml AND lets you have mockup text that is then replaced Unfortunately, petal supports all the smart features of tal like if/ loops (stuff I didn't want in there), but its ok. i'll deal. Thanks to all.