AnsweredAssumed Answered

Performance Problem categoryService.setCategories

Question asked by robobot on Feb 12, 2009
Latest reply on Feb 13, 2009 by robobot
Hello, i have a perfomance problem with the categoryService.

   if(data.getCategories() != null){
     try {        
       Reference reference = new Reference(STORE, null, documentPath);
       Predicate predicate = new Predicate(new Reference[]{reference}, STORE, null);
       ArrayList<Reference> categoryList = new ArrayList<Reference>();
       AppliedCategory appliedCategory = new AppliedCategory();
       String category = ROOT_CATEGORY+data.getCategories()[0];
       Reference catRef = new Reference(STORE, null,category);    
       appliedCategory.setCategories(categoryList.toArray(new Reference[0]));      
       AppliedCategory[] appliedCategories = new AppliedCategory[]{appliedCategory};      
       categoryService.setCategories(predicate, appliedCategories);
      }catch (Exception ex){       

if the fragment above is called in a loop, say 7 times, it seems that "categoryService.setCategories(predicate, appliedCategories);" took very long time for each entry. Can anybody give me a hint what maybe the problem here. Thank you.