cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Musall, Maik" <m...@selbstdenker.ag>
Subject Re: Fetching lots of objects
Date Wed, 08 Mar 2017 16:47:49 GMT
Whoa. Parallel instantiation down to <2700 ms using multiple threads with a local ObjectContext
each.

Well, if I need them all in the same context to work with after this, I would then need to
localObject() them and be back at locking, this time against the graph manager. Dang. It would
be nice if Cayenne would internally parallelize things like ObjectResolver.objectsFromDataRows()
and use lock-free strategies to deal with the caching.


> Am 08.03.2017 um 14:17 schrieb John Huss <johnthuss@gmail.com>:
> 
> If parallel is going to have any benefit you have to be using separate
> object contexts to avoid locking the same DataRow cache.
> On Wed, Mar 8, 2017 at 5:59 AM Musall, Maik <maik@selbstdenker.ag> wrote:
> 
>> 
>>> Am 08.03.2017 um 10:56 schrieb Aristedes Maniatis <ari@maniatis.org>:
>>> 
>>> On 8/3/17 6:54pm, Musall, Maik wrote:
>>> 
>>>> regular SelectQuery: 25888 ms for 1291644 objects
>>>> DataRowQuery alone: 14289 ms for 1291644 rows
>>>> DataRowQuery sequential instantiation: 6878 ms for 1291644 objects, sum
>> = 21167
>>>> DataRowQuery parallel instantiation: 7351 ms for 1291644 objects, sum =
>> 21640
>>>> DataRowQuery with iterator: 22484 ms for 1291644 objects
>>>> DataRowQuery with batch iterator of 100 each: 21219 ms for 1291644
>> objects
>>> 
>>> What about trying the new M5 release from yesterday and its ability to
>> select just the columns you need. You'll just get a list of column data
>> instead of a simpler object model, but it might be faster.
>>> 
>> 
>> This is M5 already (M6-SNAPSHOT really). But I need the full objects
>> because I need to do computations on them using the business logic
>> implemented in the DataObject class.
>> 
>> Maik
>> 
>> 


Mime
View raw message