Home: Perl Programming Help: Advanced:
Performance Issue with Inline::Java module

New User

Nov 22, 2010, 9:52 PM

Views: 2590
Performance Issue with Inline::Java module


I am using a jar file in Perl script using Inline::Java module. First I am initializing the beans and then getting a service bean. Using this service bean, I am executing a query to get the results(Java domain objects). The query execution is taking almost 10 seconds. After getting the results, I am constructing a hash with the required data. I am fetching this data by calling getter methods defined on each object in the result. But the issue is each getter call itself taking 350 milli seconds. I have thousands of objects in the result. So it is taking 20-25 minutes to construct the complete hash. Is there any way to reduce the time taken by each getter call ? or Is there any way through which I can convert the Java objects into hash directly ?