2 Replies Latest reply on Apr 1, 2004 11:25 AM by James Clover

    SOAP performance problems

    dan_k Newbie

       

      "dan_k" wrote:
      Hello colleagues !

      I have a session bean wrapped with a webservice. One method returns a collection of entity beans, which may contain thousands of records. Query is parametrized, and collection size depends on parameters values.
      Two queries were tested. First returned 290 records, second 1070 records. In first case SOAP response was sent in 5 seconds, in second case it took 40 seconds.
      I added some logging to session bean also, to find out how much time pure EJB-QL takes. In both cases it was quicker than 1 second. So I guess most time is occupied with xml serialization.

      Earlier the response was even slower, until I added TransactionRequestHandler and TransactionResponseHandler to web service descriptor. So this idea should be excluded.
      Also I had to change log4j configuration, because JBoss printed SOAP responses to log by default. Now it don't .
      However, performance is still not satisfactory for my task.

      Any other ideas ?

      TIA,
      Daniel


        • 1. Re: SOAP performance problems
          dan_k Newbie

          Although nobody answers, here is some more information to the topic.

          My purpose is to pass large dataset (up to several thousands records) with SOAP.
          When I use standard way (session bean returns a collection of entity beans), passing 3500 records takes 5,5 minutes.

          I have just tried to add another method to session bean, that iterates through the same collection of 3500 entity beans and writes data to string in text format (comma-separated). This operation is being performed on server-side, so Web-sevice method returns one string instead of 3500 beans.
          For this method, SOAP call takes 15 seconds against 5,5 minutes in previous case.

          My conclusion : bottleneck is in serializing collection of CMP to XML envelope in JBoss.NET .
          I still wonder is there any way to make this process faster ?

          • 2. Re: SOAP performance problems
            James Clover Newbie

            I don't have a real answer for you, but it may be that the serializer that is converting your CMP beans to XML is doing it in a generic fashion - i.e., using reflection or some such. This will most likely be much slower than a custom serializer, like your comma-separated one.

            Find out what class is doing the serialization - you may just need a custom serializer.