Open dialog with ajax really slow

UI Components for JSF
Locked
fiktion
Posts: 100
Joined: 25 Aug 2010, 17:47

18 Nov 2010, 15:08

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?

User avatar
bumble.bee
Posts: 723
Joined: 29 Sep 2010, 21:39
Location: United States

18 Nov 2010, 16:06

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.

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

18 Nov 2010, 22:15

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.

aferper9
Posts: 6
Joined: 17 Oct 2011, 14:02

31 Jul 2013, 10:35

Have you solved the problem?

For me open dialogs is extremely slow aswell

User avatar
sudheer
PrimeFaces Core Developer
Posts: 4345
Joined: 16 Oct 2011, 19:19
Location: Singapore

31 Jul 2013, 12:43

@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.
Author,Speaker
https://twitter.com/sudheerjonna
Github: https://github.com/sudheerj
Website http://sudheerjonna.com/

___________________
Sudheer Jonna

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

31 Jul 2013, 12:58

Locking topic due to epic resurrection.

Locked

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 26 guests