When I click on a button to open a dialog it takes about 6 seconds for it to load via ajax. I don't know if this is something with my program or if its just primefaces but I have a link on my page to open a dialog that holds a form. The form is for entering a new address. my commandButton looks like this
<p:commandButton value="Add Address" action="#{bean.clearForm"} update="myForm:DialogContent" oncomplete="addrDialog.show()" />
the clear form function clears out any existing data from the input fields. I have commented this out to make sure that this is not causing the delay but it still takes around 5 - 6 seconds without it. Has anyone run into this problem before?
Open dialog with ajax really slow
- bumble.bee
- Posts: 723
- Joined: 29 Sep 2010, 21:39
- Location: United States
You probably want to use actionListener NOT action. I think action is for navigation.
However, that is extremely slow even for a full page request. You might want to use phase listeners and system event listeners to try to trace what might be going on. If you're using a database make sure that you are logging query activity (make sure none is happening).
For example, if you are using the preRenderView system event to make a database query be aware that it will be called even for AJAX requests.
You might also try setting the process attribute to @this. Not sure if the default is @this or @form.
However, that is extremely slow even for a full page request. You might want to use phase listeners and system event listeners to try to trace what might be going on. If you're using a database make sure that you are logging query activity (make sure none is happening).
For example, if you are using the preRenderView system event to make a database query be aware that it will be called even for AJAX requests.
You might also try setting the process attribute to @this. Not sure if the default is @this or @form.
-
- Prime
- Posts: 18616
- Joined: 05 Jan 2009, 00:21
- Location: Cybertron
- Contact:
5-6 seconds is too much, we have many ajax dialogs in our apps and there are many in showcase that works under 1 second even on a network connection.
@aferper
Without DB calls or complex business logic from serverside then there is no chance of 5-6 seconds delay for dialog component.You are raising 3 years old thread.So you should post it as separate topic with respect to forum rules.
Without DB calls or complex business logic from serverside then there is no chance of 5-6 seconds delay for dialog component.You are raising 3 years old thread.So you should post it as separate topic with respect to forum rules.
Author,Speaker
https://twitter.com/sudheerjonna
Github: https://github.com/sudheerj
Website http://sudheerjonna.com/
___________________
Sudheer Jonna
https://twitter.com/sudheerjonna
Github: https://github.com/sudheerj
Website http://sudheerjonna.com/
___________________
Sudheer Jonna
-
- Prime
- Posts: 18616
- Joined: 05 Jan 2009, 00:21
- Location: Cybertron
- Contact:
Locking topic due to epic resurrection.
-
- Information
-
Who is online
Users browsing this forum: No registered users and 26 guests