cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrus Adamchik <>
Subject Re: weakly referenced paged queries
Date Sun, 22 Jun 2008 20:28:56 GMT

On Jun 20, 2008, at 10:41 PM, √ėyvind Harboe wrote:

> - the JavaDoc explained *why* the synchronization is there and what it
> is supposed to do and how the client is supposed to use it.

 From the class JavaDocs: "A synchronized list that serves as a  
container of DataObjects"... A Collection is either synchronized or  
not. No other explanation is needed.

Now regarding the synchronization scope, my current POV (that is  
somewhat different from my past opinion) is that the list methods  
should NOT be synchronized by default (i.e. users should create  
synchronized wrappers if they need to). This way IncrementalFaultList  
will be aligned with standard Java collections. One thing that still  
must be synchronized internally is the DB operations to avoid multiple  
concurrent fetches of the same data. This does not require  
synchronization of most normal list access methods. I.e. the scope of  
synchronization should be significantly reduced. (We can do something  
extra fancy with syncing DB ops per page to allow parallel page  
faulting, but that's certainly not a very high priority task).

Now your mention of performance issues... My guess without looking at  
the code, this is unlikely to happen due to oversynchronization.  
Compared to other things that are going on, synchronization overhead  
should be negligible. Of course running in profiler should answer that  
for sure.

Finally thanks for opening CAY-1075. One request - could you submit  
any code as patches instead of full files - it will make it much  
easier to analyze the changes.


View raw message