When I add RMI proxy reference for a java swing jlitt-component, I have major performance issues I < / P>
I am retrieving the list of user profiles
s with a server from RMI, the recovery itself only takes one or the other, therefore it is acceptable in the circumstances. However, when I try to add these proxes to JList
with the help of a custom ListModel
and CellRenderer
, then it is 30 to 180 60 seconds to add an object since it is a list of users' names, so it is a priority to present them alphabetically.
The biggest display hit occurs when I sort the elements because they add to the list model because the list will always be sorted, so I can add the next element to find the correct position The built-in option to use Collections.binarySearch ()
, and the comparator uses the two methods defined by the profile
interface, i.e. getFirstName ( )
and
Is there a way to speed up this process, or am I just applying it incorrectly? Or is it a "feature" of RMI?
Update and possible solutions: I really would like to be able to cache some of the data from remote objects locally Local classes have been created which implement remote interfaces and in terms of remote objects speed increase is noticeable and it now works randomly (at least yet). I hope that we do the same work for other interfaces used in our application. Thanks for the input that I think helps to guide me.
I think you have the same performance field for your profile object and return them with the same profile It's okay to bring the whole profile back to the inspector view, but if you have an overview view, you should take them back to the initial query.
Comments
Post a Comment