It depends how big your request and response objects that are being send back and forth are. If they are single, relatively normal length string messages going there and then back, then it's going to be very inexpensive and very fast. In the situation where your messages are fairly small like this, the biggest expense is simply PING time. I just started using RPC callbacks with simple string messages and I timed it at around (if I remember correctly) about 60-100ms; there and back. Or maybe that was what I got when I pinged the server. I'm sure my requests didn't go over 150ms. Anyways, the point is that it's quite fast, YET having a delay of about 100ms IS very noticeable to the user! So you should choose wisely and design carefully.
For example, if you want to validate some input sometimes you truly do have to check it against a database and doing an async callback is necessary, but if you are just making sure the input is an email and want to tell the user really fast that it isn't an email address, validate it on the client (any data saved on the server should be validated again). So just keep in mind that code run on the client is (unless you are crunching through tons of data) going to run instantaneously to the user, and that they can and will notice delays of 100ms. I certainly do. The async callbacks would be more expensive if you are transferring a lot of data, but that's pretty rare. I doubt a large form with numerous inputs would add much more than a few ms on top of a single string. But I haven't measured it. cheers On Jun 5, 12:44 am, rjcarr <[email protected]> wrote: > It's a servlet request, just like any other request. I don't think > there is a tremendous amount of overhead ... the gwt framework just > has to dispatch the request to the proper method and deserialize > whatever you passed. > > Making a request is expensive in general, but I don't think rpc calls > are substantially more expensive than any other request. What you do > to compose the response could be expensive, though. > > On Jun 2, 11:42 pm, Ren <[email protected]> wrote: > > > > > Hi Everyone. > > > How expensive is the Asynchronous callback to the Impl class? > > Is it good practice to keep the asynchronous calls to a minimum? > > > I see it the same as using a custom taglib to perform an action on the > > back end, example: checking permission before displaying a table or a > > hyperlink. -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
