In a similar vein, people are still recommending Cache::Cache or things based on IPC::ShareLite, when BerkeleyDB or Cache::FastMmap would be about ten times as fast. Hopefully my upcoming article based on my talk at ApacheCon will help point people in the right direction on that.
The most recent and most surprising was a big performance bug in Maypole that I discovered while helping Jesse Sheidlower with some performance tuning. People who have used Template Toolkit with mod_perl in a high-performance environment should know that you have to keep the TT object around between requests so that you don't blow the cache and recompile the templates on every hit. Maypole was throwing away the TT object. I gave Jesse a very small patch to fix this and he reported speedups of 250-500% on his application.
What's the lesson in all of this? Probably that being engaged on mailing lists like mod_perl and TT and sites like perlmonks.org has a tangible payoff in terms of knowing what the best practices are. Maybe also that we need to repeat them more often.
SQLite (Score:2)
David
Re:SQLite (Score:1)
DB Benchmarks (Score:1)
George Schlossnagle posted some interesting performance benchmarks [schlossnagle.org] on reading from embedded databases.
I was surprised to see how crappy SQLite was, especially in the wake of all the earlier raves I'd read about it compared to MySQL for SELECTs.
-adam
Re:DB Benchmarks (Score:2)
It also makes a difference how you execute the query. i.e. do you cache the statement handle, do you use bound variables for the output, etc.
Re:DB Benchmarks (Score:1)
Re:DB Benchmarks (Score:2)
Re:DB Benchmarks (Score:2)
Re:DB Benchmarks (Score:1)
Re:DB Benchmarks (Score:1)
Re:DB Benchmarks (Score:1)
SpamAssassin (Score:1)
SpamAssassin originally used Any_DBM (huge mistake, but that one predates me). Of the modules that Any_DBM uses, DB_File was the best choice for stability, portability, and performance reasons and it had the same interface as Any_DBM so we've stuck with it for a few versions. We're likely to eventually deprecate (or discourage) DB_File in favor of SDBM_File which is now a better option since other changes have made its deficiencies a non-issue. SDBM_File is f
Re:SpamAssassin (Score:1)
I would like to try a BerkeleyDB version. It would be much faster than SDBM_File. If I get something working, I'll send in the patch.
Repetition. Repetition. Repetition. Repetition. (Score:1)
That is definitely the key. Word needs to get out. People need to be told. Over and over, until they start to repeat it to others themselves.
Good performance at macroscopic scale is all about understanding the interactions between layers of abstraction. Unfortunately that is the hardest to come by kind of knowledge, for a number of reasons. Good practices are therefore not going to be establish themselves; they need insistent advocates.
A minor detail that could prevent BerkeleyDB (Score:2)
Re:A minor detail that could prevent BerkeleyDB (Score:1)