[mp2 filters] allocating modperl_wbucket_t or not

2003-12-11 Thread Stas Bekman
Currently we allocate a wbucket of type modperl_wbucket_t for each filter invocation. If it's not a streaming filter (i.e. manipulates bucket brigades or doesn't use read/print) it's never going to need wbucket. wbucket consumes 16404 bytes, the filter struct without wbucket consumes 60 bytes. In o

Re: [mp2 filters] allocating modperl_wbucket_t or not

2003-12-11 Thread Geoffrey Young
Stas Bekman wrote: > Currently we allocate a wbucket of type modperl_wbucket_t for each > filter invocation. If it's not a streaming filter (i.e. manipulates > bucket brigades or doesn't use read/print) it's never going to need > wbucket. wbucket consumes 16404 bytes, the filter struct without >

Re: [Patch mp2] PerlSections namespace

2003-12-11 Thread Geoffrey Young
Stas Bekman wrote: > Philippe M. Chiasson wrote: > >>> so maybe at startup it's not a bad idea after all :) >> >> >> >> So, does this mean that you don't have a specific objection against >> deprecating (or tossing) direct access to %Apache::ReadConfig:: in the >> future in favor of ->add_config

Re: [mp2 filters] allocating modperl_wbucket_t or not

2003-12-11 Thread Stas Bekman
Geoffrey Young wrote: Stas Bekman wrote: Currently we allocate a wbucket of type modperl_wbucket_t for each filter invocation. If it's not a streaming filter (i.e. manipulates bucket brigades or doesn't use read/print) it's never going to need wbucket. wbucket consumes 16404 bytes, the filter stru

Re: [Patch mp2] PerlSections namespace

2003-12-11 Thread Stas Bekman
Geoffrey Young wrote: Stas Bekman wrote: Philippe M. Chiasson wrote: so maybe at startup it's not a bad idea after all :) So, does this mean that you don't have a specific objection against deprecating (or tossing) direct access to %Apache::ReadConfig:: in the future in favor of ->add_config("

Re: [mp2 filters] allocating modperl_wbucket_t or not

2003-12-11 Thread Geoffrey Young
>> you're still way ahead of the game here, so go with what you think is >> best >> (thanks for asking, though :) > > > Are you talking about premature optimization, or are you just implying > that you hadn't caught up with filters implementation yet? definitely the latter - I'm still very far

what response code filters should return when they see c->aborted?

2003-12-11 Thread Stas Bekman
If the connection is aborted filters need to know how to deal with that situation and not waste resources processing data which is going to be dumped anyway. It's easy to do by checking c->aborted every so often. The question is, what's the proper response code should the filter return if it dec

Re: [Patch mp2] PerlSections namespace

2003-12-11 Thread Geoffrey Young
>> especially when you take in to account that extra steps are needed for >> when >> ordering is important (like rewrite rules). > > > True. One needs to use Tie::IxHash for this purpose. or Tie::DxHash, depending on the complexity of what you need to accomplish. it's very messy. --Geoff -

Re: what response code filters should return when they see c->aborted?

2003-12-11 Thread Stas Bekman
[sorry, it was meant to go to httpd-dev, now reposted ] Stas Bekman wrote: If the connection is aborted filters need to know how to deal with that situation and not waste resources processing data which is going to be dumped anyway. It's easy to do by checking c->aborted every so often. The que

Re: [Patch mp2] PerlSections namespace

2003-12-11 Thread Philippe M. Chiasson
On Thu, 2003-12-11 at 10:11, Stas Bekman wrote: > Geoffrey Young wrote: > > > > Stas Bekman wrote: > > > >>Philippe M. Chiasson wrote: > >> > >> > so maybe at startup it's not a bad idea after all :) > >>> > >>> > >>> > >>>So, does this mean that you don't have a specific objection against >

Re: [Patch mp2] PerlSections namespace

2003-12-11 Thread Stas Bekman
Philippe M. Chiasson wrote: [...] Yes, and I am planning on writing 2 subclasses to Apache::PerlSections to handle either a namespace name, or a hash ref, as in: package My::Config; $Location{'/foo'} = { [...] }; @Alias = qw(/this /that); and Apache::PerlSection->add_namespace("My::Config"); or

Re: [Patch mp2] PerlSections namespace

2003-12-11 Thread Stas Bekman
Yes, and I am planning on writing 2 subclasses to Apache::PerlSections to handle either a namespace name, or a hash ref, as in: package My::Config; $Location{'/foo'} = { [...] }; @Alias = qw(/this /that); and Apache::PerlSection->add_namespace("My::Config"); or my %My::Config = ( 'Locat

Re: [mp2 filters] allocating modperl_wbucket_t or not

2003-12-11 Thread Stas Bekman
Stas Bekman wrote: Geoffrey Young wrote: Stas Bekman wrote: Currently we allocate a wbucket of type modperl_wbucket_t for each filter invocation. If it's not a streaming filter (i.e. manipulates bucket brigades or doesn't use read/print) it's never going to need wbucket. wbucket consumes 16404 by

Re: [Patch mp2] PerlSections namespace

2003-12-11 Thread Philippe M. Chiasson
On Thu, 2003-12-11 at 11:01, Stas Bekman wrote: > > Yes, and I am planning on writing 2 subclasses to Apache::PerlSections > > to handle either a namespace name, or a hash ref, as in: > > > > package My::Config; > > $Location{'/foo'} = { [...] }; > > @Alias = qw(/this /that); > > and > > Apache::

[Patch mp2] #2 PerlSections namespace

2003-12-11 Thread Philippe M. Chiasson
Following this discussion: http://marc.theaimsgroup.com/?t=10710004043&r=1&w=2 I've made a few adjustements and cleanups. The following patch adds ModPerl::Util::file2package() to build a safe package from a pathname or filename. This is in turn used by sections to put each block in it's o

Re: [mp2 filters] allocating modperl_wbucket_t or not

2003-12-11 Thread Philippe M. Chiasson
On Thu, 2003-12-11 at 11:35, Stas Bekman wrote: > Stas Bekman wrote: > > Geoffrey Young wrote: > > > >> > >> Stas Bekman wrote: > >> > >>> Currently we allocate a wbucket of type modperl_wbucket_t for each > >>> filter invocation. If it's not a streaming filter (i.e. manipulates > >>> bucket briga

Re: [mp2] mod_perl test suite fails

2003-12-11 Thread Stas Bekman
Volker Kroll wrote: On Tue, 2003-12-09 at 18:57, Stas Bekman wrote: Which probably means that your perl POSIX implementation is broken. Wed Dec 10 12:15:18 [EMAIL PROTECTED]:~> su - Password: [EMAIL PROTECTED] root]# perl -le 'require POSIX; POSIX::setgid(99) or die "failed to run: $@";' [EMAI

Re: [Patch mp2] PerlSections namespace

2003-12-11 Thread Stas Bekman
Philippe M. Chiasson wrote: [...] I'll put this thread in todo/ and push it on my stack ;-) I hope you won't call detach() on it ;) __ Stas BekmanJAm_pH --> Just Another mod_perl Hacker http://stason.org/ mod_perl

Re: [Patch mp2] #2 PerlSections namespace

2003-12-11 Thread Stas Bekman
Philippe M. Chiasson wrote: Following this discussion: http://marc.theaimsgroup.com/?t=10710004043&r=1&w=2 I've made a few adjustements and cleanups. The following patch adds ModPerl::Util::file2package() to build a safe package from a pathname or filename. Do you think we should really expo

Re: [Patch mp2] #2 PerlSections namespace

2003-12-11 Thread Geoffrey Young
Stas Bekman wrote: > Philippe M. Chiasson wrote: > >> Following this discussion: >> http://marc.theaimsgroup.com/?t=10710004043&r=1&w=2 >> >> I've made a few adjustements and cleanups. >> >> The following patch adds ModPerl::Util::file2package() to build a safe >> package from a pathname or

Re: [Patch mp2] #2 PerlSections namespace

2003-12-11 Thread Stas Bekman
Geoffrey Young wrote: Stas Bekman wrote: Philippe M. Chiasson wrote: Following this discussion: http://marc.theaimsgroup.com/?t=10710004043&r=1&w=2 I've made a few adjustements and cleanups. The following patch adds ModPerl::Util::file2package() to build a safe package from a pathname or fi

rfc: ModPerl::ModuleSetup

2003-12-11 Thread Stas Bekman
So now I have several modules that leave in the same package, work with both mod_perl generations, though they need to know which version to build for at the 'perl Makefile.PL' time. I've mentioned this issue several times already and I have some code, that it'd be nice to have in the core of mp

Re: [mp2] raising the default startup timeout

2003-12-11 Thread Stas Bekman
Geoffrey Young wrote: Stas Bekman wrote: As our test suite grows it takes more and more time to start the server, the worker mpm almost always fail to start within 60 secs on my machine (which is pretty fast). And now we get reports from users who run prefork and it takes 68 secs to start. yikes

CPAN indexing on Apache-Test

2003-12-11 Thread Randy Kobes
This may be an unsolveable problem, but when using CPAN.pm to explore Apache-Test, some strange things arise: [EMAIL PROTECTED] randy]$ cpan cpan shell -- CPAN exploration and modules installation (v1.76) ReadLine support enabled cpan> m Apache::Test Module id = Apache::Test DESCRIPTION Fra