I'm not sure if the following is an Alfresco issue or a Chemistry issue, so for
now I'm reporting it to both sets of folks :) Of course it's possible that this
is not an issue at all. As I said in my previous post I'm testing with CMIS
Workbench 0.8 and against Alfresco Enterprise 4.2.1.8.
In Alfresco, I used the following javascript to create 1000 empty documents in
a folder:
---
logger.log('STARTING');
for (var i = 1; i <= 1000; i++)
{
document.createFile('test-' + i + '.txt');
}
logger.log('DONE');
---
I'm profiling against the 3.x Web Services bindings using the Groovy Console in
CMIS Workbench.
The following script consistently runs in 1-2 seconds:
---
import org.apache.chemistry.opencmis.client.api.*
import groovy.time.*
Date start = new Date();
println start;
OperationContext ctx = session.createOperationContext();
println session.getObjectByPath("/My
Project/Forms").getChildren(ctx).getTotalNumItems();
Date stop = new Date();
println stop;
TimeDuration td = TimeCategory.minus( stop, start )
println td
println "DONE";
---
However the following script, where I just set the max items per page,
consistently takes 15-17 seconds:
---
import org.apache.chemistry.opencmis.client.api.*
import groovy.time.*
Date start = new Date();
println start;
OperationContext ctx = session.createOperationContext();
// FOLLOWING LINE IS THE NEW CODE
ctx.setMaxItemsPerPage(1000);
// PREVIOUS LINE IS THE NEW CODE
println session.getObjectByPath("/My
Project/Forms").getChildren(ctx).getTotalNumItems();
Date stop = new Date();
println stop;
TimeDuration td = TimeCategory.minus( stop, start )
println td
println "DONE";
---
Hope this is useful for folks,
-- Bindu