Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: ModPerl: ASP

Load.pm patch

 

 

ModPerl asp RSS feed   Index | Next | Previous | View Threaded


tchatzi at arx

Jul 13, 2004, 5:34 AM

Post #1 of 6 (2714 views)
Permalink
Load.pm patch

Hi list.

Since I'm using Apache::ASP::Loader to precompile scripts and doing so
via NFS, it kind of took a long time.
Most of it was spent not compiling scipts, but traversing files and
directories which is still painfully slow on NFS.
Since a few of them contained about 2500 images, there should be no need
for Loader to look into them, so I added an argument to Loader
``Ommit_Dirs'' whose value should be a reference to an array containing
dirs the compiler should ommit.

I think it is reasonably useful and I *suppose* I haven't messed up, but
please look into it if you're interested.

Regards,
Thanos Chatziathanassiou
Attachments: Load.pm.ommit_dirs.patch (0.85 KB)


josh at chamas

Jul 16, 2004, 12:32 PM

Post #2 of 6 (2600 views)
Permalink
Re: Load.pm patch [In reply to]

Quoting Thanos Chatziathanassiou <tchatzi [at] arx>:

> Hi list.
>
> Since I'm using Apache::ASP::Loader to precompile scripts and doing so
> via NFS, it kind of took a long time.
> Most of it was spent not compiling scipts, but traversing files and
> directories which is still painfully slow on NFS.
> Since a few of them contained about 2500 images, there should be no need
> for Loader to look into them, so I added an argument to Loader
> ``Ommit_Dirs'' whose value should be a reference to an array containing
> dirs the compiler should ommit.
>
> I think it is reasonably useful and I *suppose* I haven't messed up, but
> please look into it if you're interested.
>

It does seem useful. My work around before has been to programmatically call
Apache::ASP->Load on only the directories that I want to be read fully. Can
this approach work for you without adding this config? Otherwise let me
consider your patch when I get back from vacation. I would think another name
like ExcludeDirs might be better, but I'll check it out for another possible
solution as well.

Regards,

Josh


---------------------------------------------------------------------
To unsubscribe, e-mail: asp-unsubscribe [at] perl
For additional commands, e-mail: asp-help [at] perl


tchatzi at arx

Jul 19, 2004, 2:11 AM

Post #3 of 6 (2603 views)
Permalink
Re: Load.pm patch [In reply to]

Joshua Chamas wrote:

>Quoting Thanos Chatziathanassiou <tchatzi [at] arx>:
>
>
>
>>Hi list.
>>
>>Since I'm using Apache::ASP::Loader to precompile scripts and doing so
>>via NFS, it kind of took a long time.
>>Most of it was spent not compiling scipts, but traversing files and
>>directories which is still painfully slow on NFS.
>>Since a few of them contained about 2500 images, there should be no need
>>for Loader to look into them, so I added an argument to Loader
>>``Ommit_Dirs'' whose value should be a reference to an array containing
>>dirs the compiler should ommit.
>>
>>I think it is reasonably useful and I *suppose* I haven't messed up, but
>>please look into it if you're interested.
>>
>>
>>
>
>It does seem useful. My work around before has been to programmatically call
>Apache::ASP->Load on only the directories that I want to be read fully. Can
>this approach work for you without adding this config? Otherwise let me
>
>
It could, but I'm probably too lazy to do it like that :)
You see, the directory structure I have is like this:
htdocs/
domain1
domain2
images/lots_of_images
irrelavant_files/lots_of_html
...
domain N
etc, so I feed the Loader the directive to compile all asp's in
/usr/local/httpd/htdocs/, which all more or less have some scripts to
compile in them.
Problem is, they also have directories I wouldn't want the Loader to
spend time looking in.
So instead of repeating the directive N times, I thought of this. I'm
sure all of us can live without it, but it did cut 40 secs out of the 3
minutes it takes to recompile all the scripts by just listing 3
directories in there.

>consider your patch when I get back from vacation. I would think another name
>like ExcludeDirs might be better, but I'll check it out for another possible
>solution as well.
>
>
I suppose ``ExcludeDirs'' is a better name...
OTOH, if you want to avoid another configuration directive, it isn't
really a problem.
Have a nice vacation !

Regards,
Thanos Chatziathanassiou


---------------------------------------------------------------------
To unsubscribe, e-mail: asp-unsubscribe [at] perl
For additional commands, e-mail: asp-help [at] perl


tchatzi at arx

Jul 19, 2004, 11:04 AM

Post #4 of 6 (2615 views)
Permalink
Re: Load.pm patch [In reply to]

Thanos Chatziathanassiou wrote:

> Joshua Chamas wrote:
>
>> Quoting Thanos Chatziathanassiou <tchatzi [at] arx>:
>>
>> It does seem useful. My work around before has been to
>> programmatically call
>> Apache::ASP->Load on only the directories that I want to be read
>> fully. Can
>> this approach work for you without adding this config?
>>
>
Actually, now that I come to think of it, it won't work: there are sites
with a number of scripts in their root directory and a subdirectory of
root filled up with other stuff, so these cannot be selectively added...

---------------------------------------------------------------------
To unsubscribe, e-mail: asp-unsubscribe [at] perl
For additional commands, e-mail: asp-help [at] perl


josh at chamas

Jul 20, 2004, 5:27 AM

Post #5 of 6 (2613 views)
Permalink
Re: Load.pm patch [In reply to]

Quoting Thanos Chatziathanassiou <tchatzi [at] arx>:

> Thanos Chatziathanassiou wrote:
>
> > Joshua Chamas wrote:
> >
> >> Quoting Thanos Chatziathanassiou <tchatzi [at] arx>:
> >>
> >> It does seem useful. My work around before has been to
> >> programmatically call
> >> Apache::ASP->Load on only the directories that I want to be read
> >> fully. Can
> >> this approach work for you without adding this config?
> >>
> >
> Actually, now that I come to think of it, it won't work: there are sites
> with a number of scripts in their root directory and a subdirectory of
> root filled up with other stuff, so these cannot be selectively added...
>

What about doing something like:

for my $file_or_dir (glob(qw(/path/to/root/*.asp)), /path/to/other) {
Apache::ASP->Load($file_or_dir, '.*', %config);
}

Since files can be loaded as well as directories?

--Josh

---------------------------------------------------------------------
To unsubscribe, e-mail: asp-unsubscribe [at] perl
For additional commands, e-mail: asp-help [at] perl


tchatzi at arx

Jul 20, 2004, 6:29 AM

Post #6 of 6 (2605 views)
Permalink
Re: Load.pm patch [In reply to]

Joshua Chamas wrote:

>Quoting Thanos Chatziathanassiou <tchatzi [at] arx>:
>
>
>
>>Thanos Chatziathanassiou wrote:
>>
>>
>>
>>>Joshua Chamas wrote:
>>>
>>>
>>>
>>>>Quoting Thanos Chatziathanassiou <tchatzi [at] arx>:
>>>>
>>>>It does seem useful. My work around before has been to
>>>>programmatically call
>>>>Apache::ASP->Load on only the directories that I want to be read
>>>>fully. Can
>>>>this approach work for you without adding this config?
>>>>
>>>>
>>>>
>>Actually, now that I come to think of it, it won't work: there are sites
>>with a number of scripts in their root directory and a subdirectory of
>>root filled up with other stuff, so these cannot be selectively added...
>>
>>
>>
>
>What about doing something like:
>
>for my $file_or_dir (glob(qw(/path/to/root/*.asp)), /path/to/other) {
> Apache::ASP->Load($file_or_dir, '.*', %config);
>}
>
>Since files can be loaded as well as directories?
>
>--Josh
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: asp-unsubscribe [at] perl
>For additional commands, e-mail: asp-help [at] perl
>
>
I see your point, if we have to list directories anyhow, why not list
the ones Load() will have to dive into ?
I kind of like the idea of Load() descending into subdirectories unless
told otherwise, since e.g. our graphics team can copy & paste a contact
form and the relavant .asp file into a client's new subdirectory, edit
the presentational aspect and actually expect it to work. Plus I think a
new-ish user will appreciate the convinience.

It's not that I have given it very much thought, more of an idea than
anything else...



---------------------------------------------------------------------
To unsubscribe, e-mail: asp-unsubscribe [at] perl
For additional commands, e-mail: asp-help [at] perl

ModPerl asp RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.