Re: DB_DataObject performance
| From: | Ian Eure | Date: | Mon, 31 Oct 2005 17:24:22 +0000 |
| Subject: | Re: DB_DataObject performance | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-40361@lists.php.net to get a copy of this message | ||
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Oct 28, 2005, at 1:21 PM, Olivier Guilyardi wrote:
Hi, I've had successful experiences using DB_DataObject on corporate intranets, with a few dozens of users. But I'm currently working on a website which may soon receive about 30000 hits a day (latest evaluation). Have any of you already used DB_DataObject on high traffic websites ? Is there any serious CPU and Memory usage benchmarks out there ? I've tried. I did not have very good success. It's my opinion that DB_DataObject is much too heavyweight, and I ran into memory consumption issues when working with many DataObject instances. Sloccount reports DataObject.php as having 2,129 physical lines of code; the actual file is 3,921 lines. I think this is a ridiculous amount of code to deal with both in terms of performance and debugging when you run into a problem, and even more so when you look at what you get for it. For comparison, a mid-sized site I built has around 8,000 physical lines of project-specific code.Incidentally, the site in question handles 15k hits/day with ease, and could /very/ easily handle 3-4 times that. It's built with Yawp, Savant2, and DB_Table. But the main issue I found was memory consumption, so watch for that. My suggestion? Avoid DBDO, and use DB_FETCHMODE_OBJECT and/or DB_Table. With some clever coding of a class for DB's objectClass, you can get almost every benefit of DBDO, without the headaches. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (Darwin) iD8DBQFDZlNGxuUdPD6j2IMRAs+eAKDOXPK+gGxscc4Oap4owQoXVCi7PgCdHQu4 fiJVL+Q4/rTj5TJn8FQ9H7Q= =Wmgd -----END PGP SIGNATURE-----