ngifying some things.
- Perrin
.
- Perrin
anyone any suggestions as to speeding this up - yet keeping it
simple - I have played with referances to avoid all the variable copying
etc . ?
Caching templates in memory would certainly help, but you'll eat up a
chunk of RAM.
- Perrin
oise level.
- Perrin
Turn on Apache::DBI's debugging messages and see if it's working
properly.
- Perrin
On Wed, 7 Jun 2000, Hui Zhu wrote:
Hi Everybody:
I got big problems. Same query and same script. Sometimes it works fine
but sometimes i get the following
errors (i am so frustrated, have no idea what i
the file gets loaded once at startup - not during the request
stage.
You probably won't get much faster than that then, no matter what you do.
Just make sure your regexps are fast (maybe use "study"?) and use
references for passing data.
- Perrin
for their own use. (I think writing
a module that does this should be a rite of passage in Perl hacking.)
- Perrin
outweighs the speed
benefit. That's when simpler techniques like the stuff used in
Apache::SSI come out ahead.
- Perrin
seems to matter
here.
- Perrin
be very fast.
I think that covers most of the arguments.
This cracked me up! Thanks Matt.
- Perrin
and that Perl's TIE mechanism is inadequate for the job.
- Perrin
mostly dynamic ones.
You may be aware of this already, but CGI::FastTemplate does not compile
to perl. It uses regular expressions and parses the template every
time. A perl compilation method will ultimately be faster.
CGI::FastTemplate should actually work fine for SSI-ish stuff, since it
doesn't cache and won't use up all your memory storing compiled perl code.
- Perrin
a mosquito with an atomic bomb?
- Perrin
thing changes in the top
level tied hash, the data will not be updated in the
backing store. You are encouraged to timestamp the
session hash so that it is sure to be updated."
- Perrin
to work, full of good people. Anyone who doesn't believe
me at this point probably never will, so I'm going to stop spamming the
list about this subject and go back to spamming about mod_perl.
- Perrin
left
is improving the speed of your database or other data access. Use
Apache::DProf to find out where it hurts.
- Perrin
, but more
randomly, is a better way?
You could look into using Apache::SizeLimit or Apache::GTopLimit
instead. I do this and set MaxRequestsPerChild to 0 for unlimited. This
way your processes only die when necessary.
- Perrin
and "sites running
mod_perl" pages on http://perl.apache.org/. You might get a few free
clicks for your trouble.
- Perrin
::LDAP-new('ldap.bigfoot.com');
Eventually you might want to make a separate subroutine (or maybe a
singleton class) that grabs the cached connection from a global, pings it
to see if it's still good, and replaces it if it fails to ping before
handing it back to the caller.
- Perrin
first time I tried to install mod_perl.
- Perrin
Saw this on Freshmeat today. It looks like it could be useful for
handling session data within a cluster, as a low-end alternative to
expensive replicated RDBMS stuff.
http://www.fault-tolerant.org/recall/
- Perrin
On Sun, 2 Jul 2000 [EMAIL PROTECTED] wrote:
Hello. I am trying to get persistant connections for my cgi-scripts using DBI
and Mysql.
I didn't see a "use pache::DBI;" or a "PerlModule apche::DBI" anywhere is
your post. Did you forget it?
- Perrin
/ StateManager.
This sounds interesting, but I don't quite understand what you did. The
sessions are stored in a dbm file, right? Don't you still need locking if
all servers are trying to update the same NFS-mounted dbm file? Or am I
totally off on how session storage is implemented?
- Perrin
to prevent lost updates, but in
practice $Session collisions are unlikely due to the separate files.
Thanks for the explanation.
- Perrin
calling the TIE methods directly or
modifying Apache::Session to support both interfaces and sending Jeffrey
the patch. Otherwise you'll definitely be adding some performance
penalties that might limit the usefulness of your additions for people
with busy sites.
- Perrin
and PerlRun is that PerlRun deletes all
compiled code and globals from the package it puts your script into after
each request. That means your script has to be compiled every time, but
things in other packages are still persistent, just as they are with
Registry.
- Perrin
TLEUntitled Document/TITLE
/HEADBODYPFile::Copy::copydir ok/P
PFile::Recurse::recurse failed/P/BODY/HTML
Why mod_perl does not like File::Recurse module???
Probably permissions. Under mod_perl you are running as "nobody".
- Perrin
???
Probably permissions. Under mod_perl you are running as "nobody".
- Perrin
packages.
Before you do this though, consider whether or not you really need to. If
you're using things from CPAN or that you've written as actual modules
with their own packages and "use strict" on, you shouldn't need to flush
them.
- Perrin
an
honest question; I'm not just being difficult.
- Perrin
actually do this from one place, iterating through a list of
namespaces to flush. Look at the code in
Apache::PerlRun::flush_namepsace. It's pretty easy.
- Perrin
n the face of it it
doesn't sound impossible, although undoubtedly there are certain ways to
defined named subs in perl that would be very hard to recognize correctly.
- Perrin
and the code to do it, and then install that as a
PerlCleanupHandler so it will automatically run after every request.
- Perrin
anyone know the solution to this problem?
You may need to modify %INC. Try removing the modules that aren't in your
"to keep" list from it at the same point where you clean put their
namespaces. PerlRun does a variation of this too.
- Perrin
contacting the author of DBD::mysql? Have you tried
building mod_perl static?
- Perrin
UPPORT doc.
- Perrin
improvement over more
obvious ways to do this. Ultimately, it kind of looks like Microsoft is
struggling to add some of the basic features of WebObjects 1.0.
- Perrin
On Thu, 20 Jul 2000, Andrew Chen wrote:
Another mod_perl success :)
Congratulations! If you have a chance, you might want to write a brief
desccription for the Success Stories page at
http://perl.apache.org/stories/.
- Perrin
::SharedCache, IPC::MM (using shared hash),
File::Cache, and BerkeleyDB, and list some advantages/disadvantages of
your module? Your module may be great, but it's hard for people to know
which one to use in this crowded field without some explanation of the
differences.
- Perrin
ount about how to use TT
efficiently from mod_perl and I'd be happy to answer questions.
- Perrin
server, in the same
mod_perl environment. So there's a problem when one version of Foo::Bar
gets cached and one script needs another version, but tries to use the one
in memory 'cause all it knows is that it needs Foo::Bar.
Take a look at Apache::PerlVINC.
- Perrin
, and apparently it happens when you undef as well. Maybe
you want to call DESTROY or untie instead.
- Perrin
a separate configuration for each virtual
host.
- Perrin
explained in an earlier
e-mail to this list) your perl variables will not free up their memory
unless you explicitly undef them. If your data is the same for each query
though, the process shouldn't be growing. I'd suspect a problem in OCI.
- Perrin
.
- Perrin
/lw-2000-07/f_lw-07-penguin_2.html) that
Zope is no panacea.
- Perrin
u need one, you should be able to add your special tags into
Dreamweaver without too much work, and I think NetObjects Fusion can do
this too.
- Perrin
is
defaulting to is root even though I've specified username and password.
That should work fine; just debug your connection problem.
- Perrin
every single one of the solutions discussed caches templates,
most of them as compiled perl code.
- Perrin
would
have to be mod_perl and you would run the templating system there and then
make calls to another server that hands back some kind of data to be
inserted in it. I've used this paradigm before.
- Perrin
java servlets as well). I think it would be helpful to newbies who don't
want to slog through the hundreds of search returns on CPAN.
- Perrin
mini-language (using a system I built):
?use type=product sku=bar1234?
?if product.isbn?
It's a book!
?/if?
?ifnot product.isbn?
It's NOT a book
).
I've been planning to do that, but I'm too busy to work on it right now.
Maybe I can add some things to what you come up with.
- Perrin
into
memory is only done once per process, so the value in optimizing this step
is very small.
- Perrin
u're using if you want to
see how to do it.
- Perrin
,
but changing namespace on CPAN always confuses some people. There are
still people who get confused about the original Apache::Session module
that was replaced by Jeff's.
- Perrin
pipeline model and build data providers according to a certain
design that some other part of your program will recognize and
automatically make their data available to templates. Plugins, basically.
- Perrin
e regex type to beat the
compile-to-perl-subs type in this scenario. At a guess, maybe
HTML::Template and CGI::FastTemplate would be contenders here. Some of
the small compile-to-perl-subs ones might work as well, like
Text::Template.
- Perrin
, but I think Persistent::TiedHash is
fine.
- Perrin
eady started in HTML, I'd say just finish that up and we'll distill it
into POD later. (html2pod?)
- Perrin
-in garbage collection just unlink files and remove
directories? That shouldn't cause it to hang. Is there something unusual
about your setup?
- Perrin
On Fri, 4 Aug 2000, darren chamberlain wrote:
Sharing a variable among children is difficult; you need to use IPC::Sharable
or something similar.
Not if it's read-only after the fork, which this one appears to be. You
can load it with a value at startup and it will be shared.
- Perrin
ariables. Does it work if you turn off PerlFreshRestart? Can you live
with that?
By the way, PerlFreshRestart is not supposed to be on by default, but
using mod_perl compiled as DSO causes similar behavior in recent versions
(1.22 on).
- Perrin
changed code. You have to do a full stop/start to pick up changes.
- Perrin
es, or use a database to load the text
segments.
Just let the filesystem do it. It's much simpler and it lets the OS
handle things that the OS is good at.
- Perrin
pache Modules with Perl and C" (the Eagle book) and
refer to the example of session tracking using path_info.
- Perrin
duce my test further, but does anyone have any ideas of
what I should look at? I'm running perl 5.005, Apache 1.3.12,
mod_perl 1.24, Apache::SSI 2.13, Apache::Cookie 0.01 (from libapreq 0.31)
on Linux (Red Hat 6.2).
- Perrin
On Fri, 11 Aug 2000, G.W. Haywood wrote:
What compiler(s)?
gcc -v says:
gcc version egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)
contributed information will be welcome, but I'd suggest waiting for
the first draft to avoid duplicating Drew's work.
- Perrin
? Or is there a
more effective way to do this?
You can do it with Expires headers. Make sure you send Last-Modified or
the pages won't get cached. If you don't want the rest of the world to
get your Expires headers, you'll have to modify mod_proxy to remove them.
- Perrin
a request, you
get no benefit at all from Apache::DBI.
- Perrin
in C, in your case) and then spending your
optimization time tuning the database and the SQL.
- Perrin
#mod_perl_and_mod_include_integra
- Perrin
in your code or are allowing Apache to
start too many processes.
- Perrin
definitely help him reduce load.
- Perrin
::MM or use BerkeleyDB (not DB_File) which
also allows for shared memeory with multiple readers/writers.
- Perrin
on every single request is going to be
expensive. If the rest of your application doesn't normally hit the
database it makes sense for this to have a significant impact.
- Perrin
t the mail archives.
Second, we need to be able to do per-user templates, which I don't
believe it can do (can AxKit do that?).
You can modify the template path at run time with any of these, which
should do the trick.
- Perrin
this module.
- Perrin
though.
- Perrin
the performance of your setup
is to make sure you have MySQL properly tuned, with an appropriate index
on this table.
- Perrin
ss stories on http://perl.apache.org/,
and maybe the ones on http://masonhq.com/ too. Also, we run
http://etoys.com/ on mod_perl.
- Perrin
ing I need to do when I
rebuild it? Or do I just need to reinstall mod_perl as it's done in
the documentation?
Just rebuild it and re-install as it shows in the docs.
- Perrin
ner still: *pure* HTML (no fake elements) that any web
tool will understand and dummy-content so the page designer can
see the end-product before any code is written.
Having placeholder data in there is an interesting benefit. What about
conditionals and loops though? Wouldn't they break the "preview"
ability?
- Perrin
. I can still think of situtations in
applications I've worked on where there were mutually excusive chunks of
HTML that would have looked funny with this approach, but it gets you
about 95% of the way towards a previewing system for free. Cool.
- Perrin
the people
involved.
- Perrin
brian moseley wrote:
On Mon, 4 Sep 2000, Perrin Harkins wrote:
[% FOREACH thing = list %]
a href="[% thing.url %]"b[% thing.name %]/b/a
[% END %]
what's the value?
It's easier for some people to understand and write without help from an
engineer.
you have to writ
Jeffrey Baker:
http:[EMAIL PROTECTED]
- Perrin
, even if it's just a tarball, is a good
idea. Build it on a different server and then just install it. Having
multiple servers really comes in handy here because you can take some off
line, upgrade them while the others are live, and then switch. Then your
site remains up the whole time.
- Perrin
, Apache::DBI does push a cleanup handler that does a rollback if
auto-commit is off. Are you saying this isn't working?
- Perrin
into it to look how
it's heppening.
With AutoCommit off, you should definitely get a rollback on every
request, provided you actually called DBI-connect on that request. Turn
on the debug flag ($Apache::DBI::DEBUG = 2) and see if the cleanup handler
is being run or not.
- Perrin
On Thu, 7 Sep 2000, Roger Espel Llima wrote:
The question now is: is there any interest in releasing this? I could
write some minimal docs and give it a 'proper' module name, if there's
interest.
I'd say this is probably useful to some people, so go ahead. A few
suggestions:
- Use the DBIx
a bit faster than Net::SMTP. I'd say that at least from a
command-line script qmail-inject is a more scalable approach.
- Perrin
does that if you don't hand it one.
- Perrin
need a config file.
Or some PerlSetVar directives in httpd.conf.
- Perrin
suspects - closures and circular refs -
but some closure problems can be very subtle.
There's also the memory-related stuff that Apache::Status provides, but
I found it difficult to get useful info out of it.
- Perrin
to be able to re-parse the config file
when someone sends Apache a certain signal. Is this possible?
Yes. If you delete a module from %INC, you can require it again. Of
course you'll lose the shared memory savings, because each child will have
it's own copy now.
- Perrin
connections or reduce the number of
mod_perl processes by using a proxy server.
- Perrin
the memory on one or more
pages. I'm no perlguts hacker, but I think this is correct.
- Perrin
example.
I'd be happy to write up a little documentation patch for it. I'll send
it to you.
- Perrin
. If that's what you tried and
it isn't working, please post a little bit of your code for us.
- Perrin
101 - 200 of 1298 matches
Mail list logo