Re: less invocation time with larger data size

John McClain <[email protected]>
Newsgroups gmane.comp.java.sun.jini
Message-ID <[email protected]>
fatma elshehri wrote:
> The average time of the call in one client case reached 1350 ms while
> for two clients case for the same data size it has reached 850 ms (in
> some cases), for the same data size.

1350 ms, that is to say 1.3 seconds? Depends on your hardware and
network of course, but these days RMI "null calls" (no work done in the
server, no args, and a void return) are generally less than millisecond.
Do you know how many bytes are in the return value? The other side of
this is how much time is each call spending in the server?

> Entries of the returned array are of the same class, which is not so
> complicated it has ,mainly two dimentional array to keep records
> selected and one other array to keep soem metadata and two simple
> functions. There are duplications in the array elements inside

When an object appears more than once in a serialization stream 2nd and
subsequent appearances are replace by a 5 byte (I think its 5 bytes -
something on that order) "pointer" to the first appearance. This can
result in quite a bit fewer bytes being sent. If the 500 record case was
really 5 copies of the 100 record case it might end up being reprsented
by a similar number of bytes because of this.

Hope this helps

--------------------------------------------------------------------------
Getting Started:     http://www.jini.org/wiki/Category:Getting_Started
Community Web Site:  http://jini.org
jini-users Archive:  http://archives.java.sun.com/archives/jini-users.html
Unsubscribing:       email "signoff JINI-USERS"  to [email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.