1 Reply Latest reply on Aug 20, 2013 9:30 PM by Barrie Callender

    createCopy() method performance in Activity class at Integration API

      i write code for copy activity using method

      Activity activity=new Activity(session, sourceActivityObjectId);
      ObjectId newActivityObjectId = activity.createCopy(targetProjectObjectId, targetWbsObjectId, null, copyActivityOption);

      its work fine, but its execution time is different in two different database server at first its take less then second and another one its take more then 40 second.

      how i get whats aproblem.
        • 1. Re: createCopy() method performance in Activity class at Integration API
          Barrie Callender

          The answer could be one of many as it could well depend on the infrastructure being used. As an example it could be one or more of the following:

          • The database servers may be diffferent sizes/configurations that make them performing differently.  So if you do other activity creation tasks such as importing the same xer file into a new project in both databases there could be a similar performance difference.
          • The load on the databases may be different such that P6 could be the only application on the faster database, but other applications may be running in the "slower" database.
          • If you are using the local api, then the network hops and/or time it takes to get a message from your client to each database could be significantly different. Try using traceroute or similar to find out the hops and time it takes from your client to each database.
          • You could even run extended sql traces on the database to see exactly what the database is doing - however it could be the network or even the load on your client at the different times.
          • You may have different settings for each api connection that could cause a problem.


          Basically there is a lot to check, but you can check each component in the system to see where the bottleneck is.  Then when you have found it, you can probably decide what needs to be done about it.