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);
categoryList.add(catRef);
appliedCategory.setCategories(categoryList.toArray(new Reference[0]));
appliedCategory.setClassification(ATTRIBUTE_CLASSIFICATION);
AppliedCategory[] appliedCategories = new AppliedCategory[]{appliedCategory};
categoryService.setCategories(predicate, appliedCategories);
}catch (Exception ex){
ex.printStackTrace();
}
}
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.