[development] Drupal's database interaction

AjK drupal at f2s.com
Sun Jul 9 00:44:54 UTC 2006



> These discussions are valuable and should not be scattered on
> blogs that may not be there in six months time.
>
> The best place for this is either here on the development list, where
> all the brains are, or  on the Performance and Scalability forum
> http://drupal.org/forum/49

OK, good point (I did ask where was a good place as I didn't really
know where to post). But discussing it here on devel seems like the
best place at the moment.

> A few comments:
>
> - PCRE would be faster since the underlying code is in C and hence
> is native to the platform. PHP is interpreted and hence slower (as you
> found out).

I've actually know along time ;) I've already written several PECLs to
remove PHP bottlenecks for clients with extraordinarily busy sites
(non Drupal stuff)

> - A PECL solution is not universal, since many of Drupal's users are
> on shared hosting where they can't fiddle with PHP's setup or  download
> plugins/libraries for it. You alluded to this, but this is more explicit.

Correct. I should have expressed this better. Realistically, if you fall
into the 1% of sites that may need a boost of this type then I'd place
money on them already being on an owned server (or two, DB/Web split)
PECLs are just not on for shared hosts for obvious reasons.

> In order to assess real penalty for the PCREs, can you try a script
> that executes without that part (i.e. take out the part where there is
> a PCRE and a callback altogether) and see what percentage improvement
> there is.

I'm not sure what you are asking here. If I take out both components then
my benchmark script would look like this:-

  function db_query($query) {
    return $query;
  }

All I currently do for time testing is the token replacement in the supplied
query string and return that string. It's not run against a database. I'm
just testing the Drupal code aspect and nothing more. I'd need more info on
what you are asking here.

best regards,
--AjK



More information about the development mailing list