2 Replies Latest reply on Apr 14, 2009 7:32 AM by palino

    Richfaces Seam performance (synchronization) issues

      Hi we have big performance issues usign ajax requests and rich faces. About 10% of request takes huge amount of time but its not during processing our code and the server is not busy at all.
      The performance statistics during request looks like this:

      REQUEST duration[ms]: 9633
      RESTORE_VIEW 1 duration[ms]: 2
      APPLY_REQUEST_VALUES 2 duration[ms]: 0
      PROCESS_VALIDATIONS 3 duration[ms]: 4
      RENDER_RESPONSE 6 duration[ms]: 11

      You can see that request took almost 10 seconds to be served (messured by filter) but jsf cycles itself were very quick.
      It leads me to conclusion there must be either richfaces or seam filter which causes this delay before it actually gets to process the request in jsf.
      Since server is not busy at all it must be some synchronization issue.

      We use conversation scope and rich faces queues to protect from concurent requests by user (global queue in web.xml and some named queues). In my understanding is should synchronize per user bases so on session or something like this but there are no previous request from the same user which would explain the delay. I could not find any explanation how queues are implemented and if they can cause this kind of issue.

      Could you pint me out where the queues are implemented (which classes and how it works)? Do you have ideas suggestions what could cause this kind of issue or how the find where the problem is? The delay is not happening every time but it is about 10% of requests.

      Seam: 2.1.0
      RichFaces: 3.3.0

      Thanks a lot
      Pavel

        • 1. Re: Richfaces Seam performance (synchronization) issues
          nbelaevski

          Hello Pavel,

          Does the problem reproduce with 3.3.1.BETA4?

          Queues functionality is implemented solely on the client; queue server code is just a supporting code serving queue initialization parameters to the client.
          If you use several queues, this can be the reason, because requests from several queues can work in parallel, thus causing synchronization problems.

          • 2. Re: Richfaces Seam performance (synchronization) issues

            Hi Nick,

            Thanks. I didn't know that queues are implemented on client and it makes sense to do it that way. I can't blame them any more than :).

            I will try to use 3.3.1 the problem is i can't reproduce it on my development machine it seems to appear on live site or during performance tests and only on some of the requests (very weird :( ).

            >If you use several queues, this can be the reason, because requests from >several queues can work in parallel, thus causing synchronization problems.
            What synchronization problems? I don't see any concurent calls problem or anything like this it just something is stoping request from processing and i don't know what it is :(.

            Thanks
            Pavel