perl-embperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gerald Richter" <rich...@ecos.de>
Subject Re: Caching DBIx::Recordset::Setup
Date Wed, 19 Nov 2003 07:10:37 GMT
Kee Hinckley wrote:
> There's an awful lot that goes on in that routine.  Typically I do
> this:
>
> $set = Setup
> series of operations with $set (insert/search/delete...)
> Is there any way to cache that initial $set?  For instance, if I call
> SetupObject, then everything is done except the ties.  In theory that
> ought to be reusable in some way, but I'm not sure how.  I need to be
> careful of the case where one routine is using a $set to do one thing
> and a routine it calls tries to use the same one to do something else.
>
> Any ideas?


You can use the $db -> TableAttr method to predeclare your parameters, but
this saves you only the parameter passing. (I use this to setup all
parameters in a central location) The actual setup is still taking place.

DBIx::Recordset caches a lot of things internaly, so the second setup of the
same object, will be much faster.

Gerald

--------------------------------------------------------------
Gerald Richter     ecos electronic communication services gmbh
IT-Securitylösungen * dynamische Webapplikationen * Consulting

Post:       Tulpenstrasse 5          D-55276 Dienheim b. Mainz
E-Mail:     richter@ecos.de          Voice:   +49 6133 939-122
WWW:        http://www.ecos.de/      Fax:     +49 6133 939-333
--------------------------------------------------------------
|
|   ECOS BB-5000 Firewall- und IT-Security Appliance: www.bb-5000.info
|
+-------------------------------------------------------------


---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org


Mime
View raw message