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 Object Cloning and performance? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of JavaScript Promises Essentials this week in the JavaScript forum!
JavaRanch » Java Forums » Java » Performance
Bookmark "Object Cloning and performance?" Watch "Object Cloning and performance?" New topic
Author

Object Cloning and performance?

Max Tomlinson
Ranch Hand

Joined: Jul 17, 2001
Posts: 365
Hi all-
I have been tasked with optimizing an MQ message transport package my company uses. The package consists of a configurable MQImpl class (taking a properties file) and two support classes (one for Put, one for Get). I've already implemented IBM's MQ Connection pooling, which shaves quite a bit of time (about half) off the MQImpl instantiation but there's still a fair amount of time taken to create the objects themselves.
My questions:
a) can I create a template type object for MQImpl and clone it for requests? Is that faster?
b) also, if I make the support classes (Put and Get) inner classes to the MQImpl object (probably a cleaner design, something I'm tempted to do), is that faster or slower overall?
This project will be using both IBM and SUN jvms in production.
thanks in advance,
Max Tomlinson
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Object Cloning and performance?