cancel
Showing results for 
Search instead for 
Did you mean: 

search.findNode() performance issue

andrepra
Champ in-the-making
Champ in-the-making
Alfresco 3.0 with about 1M documents. Windows Server 2003 4Gb, Tomcat 5.5 with 1Gb, MySQL 5.0. Few cuncurrent users (3-6). Documents and spaces are well structured (i mean not to may node at the same level)
Using Alfresco interface the performance are quite good. Also using the node browser performance are pretty good.
I have a web scripts that need to load some nodes using the uuid. This call take 3-4 seconds for a non cached node. Sometimes i need to load 200 nodes and the time to wait is too high. After the first access performance become quite good (0,2s) . 
Exists a faster method in a web scripts to load a node giving the uuid?
Thanks
Andrea
2 REPLIES 2

andrepra
Champ in-the-making
Champ in-the-making
Analyzing the problem seems that the problem is accessing the database. I've enabled the query log and this is the sql

select this_.protocol as protocol5_2_, this_.identifier as identifier5_2_, this_.guid as guid5_2_, this_.version as version5_2_, this_.transaction_id as transact5_5_2_, this_.node_id as node6_5_2_, node1_.id as id2_0_, node1_.version as version2_0_, node1_.protocol as protocol2_0_, node1_.identifier as identifier2_0_, node1_.uuid as uuid2_0_, node1_.type_qname_id as type6_2_0_, node1_.acl_id as acl7_2_0_, dbaccessco4_.id as id14_1_, dbaccessco4_.version as version14_1_, dbaccessco4_.acl_id as acl3_14_1_, dbaccessco4_.latest as latest14_1_, dbaccessco4_.acl_version as acl5_14_1_, dbaccessco4_.inherits as inherits14_1_, dbaccessco4_.inherits_from as inherits7_14_1_, dbaccessco4_.type as type14_1_, dbaccessco4_.inherited_acl as inherited9_14_1_, dbaccessco4_.is_versioned as is10_14_1_, dbaccessco4_.requires_version as requires11_14_1_, dbaccessco4_.acl_change_set as acl12_14_1_, properties5_.node_id as node1_4_, properties5_.actual_type_n as actual2_4_, properties5_.persisted_type_n as persisted3_4_, properties5_.multi_valued as multi4_4_, properties5_.boolean_value as boolean5_4_, properties5_.long_value as long6_4_, properties5_.float_value as float7_4_, properties5_.double_value as double8_4_, properties5_.string_value as string9_4_, properties5_.attribute_value as attribute10_4_, properties5_.serializable_value as seriali11_4_, properties5_.qname_id as qname12_4_ from alf_node_status this_ inner join alf_node node1_ on this_.node_id=node1_.id left outer join alf_access_control_list dbaccessco4_ on node1_.acl_id=dbaccessco4_.id left outer join alf_node_properties properties5_ on node1_.id=properties5_.node_id where this_.guid in ('5cfcaaa2-e0fb-40e6-81af-caef53b5876f', '5cfcaaa2-e0fb-40e6-81af-caef53b5876f')
  

I tried to give much memory to database (1,5G) but the performance remains poor. Any idea?

andrepra
Champ in-the-making
Champ in-the-making
I found interesting this test: I changed my webscript  removing the JavaScript thet load the node using the method search.findNode() and implementing a WebScript bean that do the works using the nodeService.getProperties(). This method is incredibly faster than JavaScript search api. I have to change all my applications implementing backed web script and forget javascript search api when i have a lot of documents?