|
View:
New views
4 Messages
—
Rating Filter:
Alert me
|
|
|
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! |
|
|
re: How to update GL eventlist from database?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):
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@... |
|
|
re[2]: How to update GL eventlist from database?Just to clarify: replaceAllSorted is not making the lock/unlock calls - it is just performing get and set operations. The ThreadSafeList is making all the lock/unlock calls, as the get/set calls are made by replaceAllSorted.
- K
----------------------- Original Message -----------------------
From: Kevin Day kevin@...
To: Glazed Lists users@...
Cc:
Date: Tue, 23 Jun 2009 16:10:40 -0700
Subject: re: How to update GL eventlist from database?
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):
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@... |
|
|
Re: re[2]: How to update GL eventlist from database?Thank you Kevin, you saved my day!
I replaced the ThreadSafeList everywhere (basically it was my bast list to all viewers). The speed improvement is next to nothing! Now I can even think about owner drawing my tables again :) Thanks alot!
|
| Free embeddable forum powered by Nabble | Forum Help |