cancel
Showing results for 
Search instead for 
Did you mean: 

Solution: improve performace in Alfresco

vinaxwater
Champ in-the-making
Champ in-the-making
when you use Alfresco common problem is the performance! Here I did not mention the issue because the hardware configuration server can normally meet for 100-1000 users that are written pretty much on the forum so I just put out a solution but it is very useful to the development and location management system my Alfresco!

Common problem is when you completed the task pane open  :mrgreen:  then all tasks will be completed with status paging load on your screen at this time is completed, the panel TASKs any action on your next (e.g: you click on page 2 or click menu on the left navigator) then load operation completed all tasks are done again this makes the performance is limited!

The solution here is to put more load conditions for the tasks can be completed by the date created (can only load the tasks completed in two months), provided that you can put in xml file (which can be done by the code read to get info from param xml file) for editing upon request from the end users :mrgreen:

View file JBPMEngine.java (press Ctr+R in Eclipse):
this is string for QUERY get tasks Completed in 2 month:

private final static String COMPLETED_TASKS_QUERY =     
   "select ti from org.jbpm.taskmgmt.exe.TaskInstance as ti " +
   "where ti.actorId = :actorId " +
   "and ti.isOpen = false " +
   "and to_char(sysdate,'yyddd')-to_char(ti.end,'yyddd')<=60 "; // vinaxwater added

this is string for QUERY get 60 rows tasks completed to the query:

private final static String COMPLETED_TASKS_QUERY =     
   "select ti from org.jbpm.taskmgmt.exe.TaskInstance as ti " +
   "where ti.actorId = :actorId " +
   "and ti.isOpen = false " +
   "and rownum <= :rw "; // vinaxwater added

find method findCompletedTaskInstances:

After row: query.setString("actorId", actorId);
Add:    query.setString("rw", "60"); // vinaxwater added

The conditions you can start with the fields in tables JBPM_TASKINSTANCE!

You can change the hard conditions by reading from the xml file for conditions when requested changes are not necessarily re-build source that just change the xml file for effect :mrgreen: and you can also apply in process or task to load the content in Alfresco :mrgreen:
This is useful for improving performance using Alfresco very much!
Note: I am using Alfresco 2.9B build version. No way affect the search content in Alfresco system because otherwise use search module :mrgreen:

Hope this helps you!

Regards
vinaxwater
3 REPLIES 3

nhienmai
Champ in-the-making
Champ in-the-making
Did it make the performance better? How many times?

mrogers
Star Contributor
Star Contributor
And if you have what you think is useful code then please contribute it so it can go into the base product.

vinaxwater
Champ in-the-making
Champ in-the-making
Hi friends,
I think in panel Task Completed load all is useful for performance! it ought to load according to parameter input form user (e.x it can date) i think useful for performance of system.
Before it's always load all Task Completed of user current login in system ( can 500 record ) but present it only load 50 record  ( Task Complete in one month ) in session login  :roll:

Regards
vinaxwater