File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Performance and the fly likes Reg : Chapter 12 - Message Reduction Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Performance
Reply Bookmark "Reg : Chapter 12 - Message Reduction" Watch "Reg : Chapter 12 - Message Reduction" New topic
Author

Reg : Chapter 12 - Message Reduction

Arvind Varma
Ranch Hand

Joined: Dec 24, 2002
Posts: 48
Jack,
you suggested to use a combined method execution to reduce the number of messages. That is indeed a good idea. But how many times we end up updating/setting all the values at the same time? will it be a good idea to add more methods to the interface (i.e. for updating two methods at a time..bool & num, num & string, string & bool) or is it better to do
setAll(new boolValue, new numValue, getStringValue) when we intend to set num and bool but not the String....
Jack Shirazi
Author
Ranch Hand

Joined: Oct 26, 2000
Posts: 96
That's not really a performance issue, more a design and coding practices issue. Some people prefer the multiple methods, some prefer one method which accepts null or a special object or value for those parameters which are not to be updated.
Performance tuning is often a tradeoff. In this case you are trading simplicity of the class definition for reduced distribution overheads.
--Jack Shirazi
JavaPerformanceTuning.com
 
 
subject: Reg : Chapter 12 - Message Reduction
 
Threads others viewed
Sub extends Base.....right?
How Inheritance Affects Serialization
bit operations
Hiding static methods (confusing)
HELP! Why not Compiling ? Easy but.......
developer file tools

cast iron skillet 49er

more from paul wheaton's glorious empire of web junk: cast iron skillet diatomaceous earth rocket mass heater sepp holzer raised garden beds raising chickens lawn care CFL flea control missoula heat permaculture