« Return to Thread: How to update GL eventlist from database?

re: How to update GL eventlist from database?

by Kevin Day-7 :: Rate this Message:

Reply to Author | View in Thread

Some parts of this message have been removed. Learn more about Nabble's security policy.
I haven't seen a response to this yet...  Here's what's probably going on (these are from the javadocs on the ThreadSafeList factory method):
 

* <p>Using a {@link ThreadSafeList} for concurrent access to lists can be expensive

* because a {@link ca.odell.glazedlists.util.concurrent.ReadWriteLock ReadWriteLock}

* is aquired and released for every operation.

 

 

So replaceAllSorted is making a huge number of lock/unlock calls.  You would be much better off managing the locks yourself, or doing these sorts of huge list updates to a list upstream of the ThreadSafeList (you'll still have to manage the locks for the big updates, natch).

 

- K


 
----------------------- Original Message -----------------------
  
From: philk phil.kursawe@...
To: users@...
Cc: 
Date: Mon, 22 Jun 2009 13:16:07 -0700 (PDT)
Subject: How to update GL eventlist from database?
  

Hello,

I am struggling with updating my EventList with data from a database. I do
full table updates with the result set from the DB query like this:
GlazedLists.replaceAllSorted(items, getDBResult(), true, null);

All items are Comparable. However the update of the list is kind of akward.
The UI refreshes very slowly. I will make a video of it later. Maybe its a
threading issue? I am using a thread-safe base list for my items. Maybe I
should manually lock and unlock the table?

Do you have any recommendations on how to do full table updates using DB
results?

Thanks!
--
View this message in context: http://www.nabble.com/How-to-update-GL-eventlist-from-database--tp24154589p24154589.html
Sent from the GlazedLists - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...


--------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@... For additional commands, e-mail: users-help@...

 « Return to Thread: How to update GL eventlist from database?