swarm-support
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Swarm-Support] Time efficiency of at$createActionTo$message


From: Marcus G. Daniels
Subject: Re: [Swarm-Support] Time efficiency of at$createActionTo$message
Date: Wed, 19 Feb 2003 07:40:59 -0700
User-agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.3b) Gecko/20030210

Marshall, James A R wrote:

You really need to drop Selectors? The Swarm Javadocs show Selector
inheriting directly from java.lang.Object and not implementing drop itself.

It's not an issue of failing to drop them. The thing to keep in mind is that as Java objects are exposed to Swarm, an association between that Java object and the Swarm native object must be maintained. For Selectors there is an explicit yellow pages (in earlier versions of Swarm there was a yellow pages for objects too -- now those objects are available as slots in the objects themselves and there is not the lookup penalty). In the case of making lots of new Selectors, you are creating a many to one relationship in this yellow pages, e.g. a bunch of different names for the same phone number. As more and more objects get added to the yellow pages, things will get slower and slower because the directory takes longer to search.

The solution I would suggest is not to allocate more than one Java-side selector. One good way to do this is to use the FAction idiom as in the example I posted, but cache the result of `createCall' in an ivar. Then you'll have a speedy call and you can focus on understanding the remaining performance problems, if any.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]