ObjectDB Parsing taking huge processing time

#1

Hi Team,

We are trying to get the Persistence Manager Factory using the code mentioned below, but it is taking a significant amount of processing time even though we don't have a large amount of data. Please let us know what could be causing this issue.

JDOHelper.getPersistenceManagerFactory(
  getProperties( aPhysicalPath, aObjectName ),
  JDOHelper.class.getClassLoader()
);

Thanks,

Vinoth

 

#2

First, please try to isolate the getPersistenceManagerFactory from the methods that prepare its parameters (getProperties, getClassLoader), by preparing the parameter values in separate lines before, just to make sure that the issue is with the getPersistenceManagerFactory method (which is very likely).

The getPersistenceManagerFactory method does a lot of work so it is expected to be relatively slow. Usually this is not an issue, as it should only be called once per database. The getPersistenceManager method, which can be called many times per database to create database connections is much faster.

That said, some factors may make getPersistenceManagerFactory particularly slower, such as having a configuration file with many unused activation keys or having schema with hundreds of complex types.

To analyze your specific case please provide a test case that demonstrates the issue, or at least profiling data that shows where time is spent by this method.

ObjectDB Support
#3

Hi Team,

We have taken thread dumps during the execution, and we see that it is taking more time in the lines mentioned below. We have also attached the thread dump snapshots, which were taken at regular intervals.

The ODB files are only 256KB each; please find them attached.

 at java.net.NetworkInterface.getAll(Native Method)
        at java.net.NetworkInterface.getNetworkInterfaces(NetworkInterface.java:355)
        at com.objectdb.o.CFG.am(CFG.java:773)
        at com.objectdb.o.CFG.ak(CFG.java:673)
        at com.objectdb.o.CFG.aj(CFG.java:624)


java.lang.Thread.State: RUNNABLE
        at java.net.NetworkInterface.getMacAddr0(Native Method)
        at java.net.NetworkInterface.getHardwareAddress(NetworkInterface.java:472)
        at com.objectdb.o.CFG.am(CFG.java:777)
        at com.objectdb.o.CFG.ak(CFG.java:673)
        at com.objectdb.o.CFG.aj(CFG.java:624)
        at com.objectdb.o.CFG.ae(CFG.java:527)

Thanks,

Vinoth

#4

The threads are related to checking activation keys.

Check how many activation keys you have in the ObjectDB configuration file (objectdb.conf).

You need only one activation key in development and none in the final product (when you use an OEM licence).

ObjectDB Support
#5

Thanks for your quick response, it solves the issue of slowness.

Reply