Slow Recalculation�s time

We have a project with about two thousand tasks sequenced by the network of predecessors
When there is a change at some date task is taking about 4 seconds to recalculate the new dates and this time increases exponentially when the number of tasks also increases from 2000 tasks.
Is there any way to reduce this recalculation’s time?

Hi,


We are sorry for a delayed response. We have analyzed your shared problem and were able to identify the delays you have mentioned. We are still testing this issue at our end with a number of other tests to compare the performance with the .NET equivalent of the API. The tests will be completed soon and once it is done, we shall share our feedback here with you.

Hi,


We have analyzed the problem and compared the performance in .NET and Java platform. A sample project file is created with 3000 tasks with each task having predecessor. This file is opened using Aspose.Tasks for Java 8.8.0 and one of the tasks start date is modified. After this Reclaculate() function is called. It is observed that it takes about 40 seconds to complete this function.

This issue is logged in our issue tracking system for further investigation by the product team under id: TASKS-34240. I shall write here as soon as some feedback is received in this regard.

Some news about this issue? Or an alternative?


We need performative lib to work with our projects.

Hi,


Thank you for contacting Aspose support team again.

I have tested the scenario using Aspose.Tasks for Java 9.4.0 and observed that for a project having about 3000 tasks, a task date is changed and recalculate function is called. It just takes 2 seconds to execute Recalculate() function for this project file. Could you please give try to the following sample code using attached project file and share the feedback?

<span style=“font-size: 9pt; font-family: “Courier New”;”>Project proj = <span style=“font-size:9.0pt;font-family:“Courier New”;mso-fareast-font-family:“Times New Roman”;
color:navy”>new
<span style=“font-size: 9pt; font-family: “Courier New”;”>Project(path + <span style=“font-size:9.0pt;font-family:“Courier New”;mso-fareast-font-family:“Times New Roman”;
color:green”>“Output_3000.xml”
<span style=“font-size: 9pt; font-family: “Courier New”;”>);

Task task = proj.getRootTask().getChildren().getById(<span style=“font-size:9.0pt;font-family:“Courier New”;mso-fareast-font-family:“Times New Roman”;
color:blue”>20<span style=“font-size: 9pt; font-family: “Courier New”;”>);
<span style=“font-size: 9pt; font-family: “Courier New”;”>SimpleDateFormat DF_DDMMYYYY_HHMM = <span style=“font-size:9.0pt;font-family:“Courier New”;mso-fareast-font-family:“Times New Roman”;
color:navy”>new
<span style=“font-size: 9pt; font-family: “Courier New”;”>SimpleDateFormat(<span style=“font-size:9.0pt;font-family:“Courier New”;mso-fareast-font-family:“Times New Roman”;
color:green”>“dd/MM/yyyy HH:mm”
<span style=“font-size: 9pt; font-family: “Courier New”;”>);



<span style=“font-size:9.0pt;font-family:“Courier New”;mso-fareast-font-family:
“Times New Roman”;color:navy”>try
<span style=“font-size: 9pt; font-family: “Courier New”;”>{

task.set(Tsk.<span style=“font-size:9.0pt;font-family:“Courier New”;mso-fareast-font-family:“Times New Roman”;
color:#660E7A”>START
<span style=“font-size: 9pt; font-family: “Courier New”;”>,
DF_DDMMYYYY_HHMM.parse(<span style=“font-size:9.0pt;font-family:“Courier New”;
mso-fareast-font-family:“Times New Roman”;color:green”>“01/01/2016
08:00”
<span style=“font-size: 9pt; font-family: “Courier New”;”>));

} <span style=“font-size:9.0pt;font-family:“Courier New”;mso-fareast-font-family:
“Times New Roman”;color:navy”>catch
<span style=“font-size: 9pt; font-family: “Courier New”;”>(ParseException
e) {

e.printStackTrace();

}



<span style=“font-size:9.0pt;font-family:“Courier New”;mso-fareast-font-family:
“Times New Roman”;color:gray”>/////////////////////////////////////////////////

<span style=“font-size: 9pt; font-family: “Courier New”;”>System.<span style=“font-size:9.0pt;
font-family:“Courier New”;mso-fareast-font-family:“Times New Roman”;color:#660E7A”>out
<span style=“font-size: 9pt; font-family: “Courier New”;”>.println(<span style=“font-size:9.0pt;font-family:“Courier New”;
mso-fareast-font-family:“Times New Roman”;color:navy”>new
<span style=“font-size: 9pt; font-family: “Courier New”;”>Timestamp(System.currentTimeMillis()) );

proj.recalculate();

System.<span style=“font-size:9.0pt;font-family:“Courier New”;
mso-fareast-font-family:“Times New Roman”;color:#660E7A”>out
<span style=“font-size: 9pt; font-family: “Courier New”;”>.println(<span style=“font-size:9.0pt;font-family:“Courier New”;
mso-fareast-font-family:“Times New Roman”;color:navy”>new
<span style=“font-size: 9pt; font-family: “Courier New”;”>Timestamp(System.currentTimeMillis()));

proj.save(path + <span style=“font-size:9.0pt;font-family:“Courier New”;
mso-fareast-font-family:“Times New Roman”;color:green”>“Output_3000_Changed.xml”
<span style=“font-size: 9pt; font-family: “Courier New”;”>, SaveFileFormat.<span style=“font-size:9.0pt;
font-family:“Courier New”;mso-fareast-font-family:“Times New Roman”;color:#660E7A”>XML
<span style=“font-size: 9pt; font-family: “Courier New”;”>);