[dev] [commits] Horde branch master updated. 413405d0e327265fc040114808380c4711010d0f

Jan Schneider jan at horde.org
Thu Aug 4 15:30:44 UTC 2011


Zitat von Vilius ?umskas <vilius at lnk.lt>:

>> Quoting Jan Schneider <jan at horde.org>:
>>
>> > commit 52d22e69b9d98df64bd8450a9c389b53d7e5c6f6
>> > Author: Vilius E umskas <vilius at lnk.lt>
>> > Date:   Thu Jul 21 22:40:22 2011 +0300
>> >
>> >     Use factory and convert to Horde_Db at the same time.
>> >
>> >     I still think Horde_Db needs selectAssoc() badly which would work
>> >     on more than two columns. I spent hours trying to figure out how
>> >     to refactor some code to use indexed arrays.
>>
>> Didn't look at your code yet, but FWIW, what I've been doing in these
>> cases is building the hash in the application's driver code. A good
>> bit of the time there are other things that needed to be done in the
>> loop anyway, e.g., driver field => application field translations.
>> This gives more control over what keys to use, and potentially saves
>> extra loops since to build the hash structure in the db layer, you
>> would need to iterate the results anyway.
>
> I'm not sure this is a very good idea in Agora, as it uses pretty  
> large arrays of data. Doubling that data could hurt performance and  
> memory usage. Or do I just misunderstood you?

If data size is a concern, you shouldn't fetch all data at once  
anyway. Use Horde_Lens or loop directly over the result set where you  
need it.

Jan.

-- 
Do you need professional PHP or Horde consulting?
http://horde.org/consulting/



More information about the dev mailing list