Charts 3.3.1. List performance is slow

I recently upgraded my primefaces-project to a new version.

Everything seems to be working fine, but the picker is very slow when you click the add all button. I have a huge data set (about 130 items) in the list. The problem is also described in this post.

UPDATE: A very simple example should show the problem:

<p:pickList value="#{testForm.dualList}" var="id" itemLabel="#{id}" itemValue="#{id}" /> 

Form (in the session area):

 @Component("testForm") @Scope("session") public class TestForm implements Serializable { private DualListModel<Integer> dualList; //getter & setter methods } 

The method that creates the DoubleListModel:

 prepareForm() { List<Integer> source = Lists.newLinkedList(); List<Integer> target = Lists.newLinkedList(); //add 100 integers as source: for(int i = 0; i <= 99; i++) { source.add(i); } DualListModel<Integer> model = new DualListModel<Integer>(source, target); testForm.setDualList(model); } 

Is there something I could do to make it faster?

+6
source share
2 answers

This seems to be a bug in the file versions. I found several other forum posts on topics about this topic.

I implemented my own picker and now everything is working fine.

+1
source

I can’t tell you the exact problem based on the amount of code you posted here. But, based on your comments, I can offer you the following:

  • Verify that the required fields within the same form do not interfere with submission.
  • Do not use nested forms
  • Make sure your ajax request sequences (actionListener, action, onclick ... etc.)
  • Make sure your codes are well written and make sense. Because sometimes you will notice strange behavior in primefaces components (not firing, not updating) if your code leads to an error.

Hope this can help you.

0
source

Source: https://habr.com/ru/post/919873/


All Articles