AnsweredAssumed Answered

Taking too long to move documents

Question asked by jlabuelo on Mar 1, 2011
Latest reply on Mar 4, 2011 by jlabuelo
Hi all

Lets see if anyone can help us here with an issue we are fiding. We have developed a new wizzard in an Alfresco 3.3 version. The purpose of this wizard is to get all the jpg documents in a space called "Inbound" and start showing them in a new customized screen that shows the document in the left section of the screen and the metadata linked to it (aspects and types) at the right of the screen. User should compare the data of the document, and introduce it manually in the metadata fields.

Once this data entry is done, user should press a button called "Accept" and the document should be moved from "Inbound" to another space called "Approved".

We have used this in a Windows XP machine with MySQL 5.1, 3 GB RAM  and Alfresco 3.3 and works totally fine, however now we need to move this configuration to a Linux Suse Machine also with MySQL5.1, 3 GB RAM and also Alfresco 3.3….however this last step of moving the document from the "Inbound" space to the "Approved" space takes much much longer…. about 3 minutes more per document.

Also just as a note we use Java 1.6 with a heap size of 1500 MB
Alfresco JVM - v1.6.0_20-b02; maximum heap size 1484,813MB

Basically the steps for the movement are:

a) Search for the documents in the "Approved" space to see if there is already a document with the same name.
a1) If there is already a document with the same name, move document from "Inbound" but adding date to the document name.
b) If search is null, move the document from "Inbound" to "Approved".

And I have to say that this takes 3 mins long even if the destination space "approved" is empty.

Here I attacht the part of the code we have used to perform this movement of the documents once approved.

public void moveDocument(){
    NodeRef acceptedRef = spaceAprobed();
   
//     List<Node> nodes = this.browseBean.getContent();
     
    // Write the node in the space
    try {
     
     String nameFile = editableNode.getName();
     NodeRef nodeExist = this.getFileFolderService().searchSimple(acceptedRef, nameFile);
     
     if(nodeExist != null){
      String nameFile = nameFile.replace(".jpg", getTime_Custom() + ".jpg");
      this.fileFolderService.rename(editableNode.getNodeRef(), nameFile);
     }
     fileFolderService.move(editableNode.getNodeRef(),
       acceptedRef, null);
   
   
    } catch (FileExistsException e) {
     e.printStackTrace();
    } catch (org.alfresco.service.cmr.model.FileNotFoundException e) {
     e.printStackTrace();
    }
   
//   return nextNode(nodes);

}

Any ideas of what could be producing this delay?

Outcomes