Re: Webservice Performance Issue

Discussion in 'ASP .Net' started by Kevin Spencer, Jul 2, 2004.

  1. 1 MB of data is going to take some time to transmit over the Internet. It's
    called "Network Latency" and is one of the biggest issues that affects speed
    of the app on the client-side.

    --
    HTH,
    Kevin Spencer
    ..Net Developer
    Microsoft MVP
    Big things are made up
    of lots of little things.

    "dinoo" <> wrote in message
    news:...
    > Hi, I am posting this here as I might receive reply from here.
    >
    > I am having a strange problem in webservices.
    >
    > Initially we had an application which use to make about 15 different

    webservice calls to load one windows form.
    > We decided to make it one and now we are calling one webmethod.
    > This webmethod has the implementation of getting all the data in one shot.
    >
    > But we are running in a problem that the data which is being transfered in

    new application is going around 1 MB. And thus even if we compare the old
    application with the new application the performance improvement is null.
    >
    > I know i could use soap extension to compress and decompress the data

    being passed between client and server.
    > But i could not understand why there is no performance gain in getting

    all the data in one shot in current case.
    >
    > I am testing this application on local machine. But still i feel i should

    get some performance benefit.
    >
    > Can anybody point out what should be remedy for this?
    > I went through the msdn aricle on the checklist for the webservice

    performance improvement. But I feel as both the application using the same
    architecture, I should receive some performance gain in new application.
    >
    > Please help.
    >
    > Thanks
    >
    > Dinoo
     
    Kevin Spencer, Jul 2, 2004
    #1
    1. Advertising

  2. Kevin,
    My concern is if both application using the same no of calls to database and same code except the new application makes one call and gets the data in one shot then i feel it should be atleast faster than the previous application which use to make 15 calls to get this data.

    I could not understand why the new application is not faster than the previous application?

    Thanks

    Dinesh


    "Kevin Spencer" wrote:

    > 1 MB of data is going to take some time to transmit over the Internet. It's
    > called "Network Latency" and is one of the biggest issues that affects speed
    > of the app on the client-side.
    >
    > --
    > HTH,
    > Kevin Spencer
    > ..Net Developer
    > Microsoft MVP
    > Big things are made up
    > of lots of little things.
    >
    > "dinoo" <> wrote in message
    > news:...
    > > Hi, I am posting this here as I might receive reply from here.
    > >
    > > I am having a strange problem in webservices.
    > >
    > > Initially we had an application which use to make about 15 different

    > webservice calls to load one windows form.
    > > We decided to make it one and now we are calling one webmethod.
    > > This webmethod has the implementation of getting all the data in one shot.
    > >
    > > But we are running in a problem that the data which is being transfered in

    > new application is going around 1 MB. And thus even if we compare the old
    > application with the new application the performance improvement is null.
    > >
    > > I know i could use soap extension to compress and decompress the data

    > being passed between client and server.
    > > But i could not understand why there is no performance gain in getting

    > all the data in one shot in current case.
    > >
    > > I am testing this application on local machine. But still i feel i should

    > get some performance benefit.
    > >
    > > Can anybody point out what should be remedy for this?
    > > I went through the msdn aricle on the checklist for the webservice

    > performance improvement. But I feel as both the application using the same
    > architecture, I should receive some performance gain in new application.
    > >
    > > Please help.
    > >
    > > Thanks
    > >
    > > Dinoo

    >
    >
    >
     
    =?Utf-8?B?ZGlub28=?=, Jul 2, 2004
    #2
    1. Advertising

  3. Optimization is one of the most challenging aspects of programming. I'm not
    sure how you're measuring performance here, but there are any number of
    reasons why you may not have seen a performance boost, or perceived no
    performance boost. For example, you mentioned that you originally called 15
    WebMethods to get data. Now, you are calling one. However, you're still
    getting the same data. And, in fact, that one WebMethod is now doing the
    work of the previous 15. So, your performance boost isn't necessarily going
    to come from calling one method which does the same work as 15 did
    previously, but in optimizing the code which actually does the work.

    --
    HTH,
    Kevin Spencer
    ..Net Developer
    Microsoft MVP
    Big things are made up
    of lots of little things.

    "dinoo" <> wrote in message
    news:...
    > Kevin,
    > My concern is if both application using the same no of calls to database

    and same code except the new application makes one call and gets the data in
    one shot then i feel it should be atleast faster than the previous
    application which use to make 15 calls to get this data.
    >
    > I could not understand why the new application is not faster than the

    previous application?
    >
    > Thanks
    >
    > Dinesh
    >
    >
    > "Kevin Spencer" wrote:
    >
    > > 1 MB of data is going to take some time to transmit over the Internet.

    It's
    > > called "Network Latency" and is one of the biggest issues that affects

    speed
    > > of the app on the client-side.
    > >
    > > --
    > > HTH,
    > > Kevin Spencer
    > > ..Net Developer
    > > Microsoft MVP
    > > Big things are made up
    > > of lots of little things.
    > >
    > > "dinoo" <> wrote in message
    > > news:...
    > > > Hi, I am posting this here as I might receive reply from here.
    > > >
    > > > I am having a strange problem in webservices.
    > > >
    > > > Initially we had an application which use to make about 15 different

    > > webservice calls to load one windows form.
    > > > We decided to make it one and now we are calling one webmethod.
    > > > This webmethod has the implementation of getting all the data in one

    shot.
    > > >
    > > > But we are running in a problem that the data which is being

    transfered in
    > > new application is going around 1 MB. And thus even if we compare the

    old
    > > application with the new application the performance improvement is

    null.
    > > >
    > > > I know i could use soap extension to compress and decompress the data

    > > being passed between client and server.
    > > > But i could not understand why there is no performance gain in

    getting
    > > all the data in one shot in current case.
    > > >
    > > > I am testing this application on local machine. But still i feel i

    should
    > > get some performance benefit.
    > > >
    > > > Can anybody point out what should be remedy for this?
    > > > I went through the msdn aricle on the checklist for the webservice

    > > performance improvement. But I feel as both the application using the

    same
    > > architecture, I should receive some performance gain in new application.
    > > >
    > > > Please help.
    > > >
    > > > Thanks
    > > >
    > > > Dinoo

    > >
    > >
    > >
     
    Kevin Spencer, Jul 2, 2004
    #3
  4. I are absulutely right Kevin.
    Optimization would be my next task.

    But making 15 calls adds serializing soap requests and responses on client as well as on server. Switching them to one should ease some network load, resulting into
    faster response.

    I also would like to know if I go for the compression with soap extentions, which would be the right library i should go for the compression?, I tried the ShareZip and J# library but if the data is very huge these libraries decompress wrong xml content resulting into failure.

    Can you suggest me any better library which compresses and decopresses large string content without failure?

    Also suggest what should be taken care in ado.net code to achive faster response from SQL Server.
    I am using stored procedures.

    Thanks

    dinoo

    "Kevin Spencer" wrote:

    > Optimization is one of the most challenging aspects of programming. I'm not
    > sure how you're measuring performance here, but there are any number of
    > reasons why you may not have seen a performance boost, or perceived no
    > performance boost. For example, you mentioned that you originally called 15
    > WebMethods to get data. Now, you are calling one. However, you're still
    > getting the same data. And, in fact, that one WebMethod is now doing the
    > work of the previous 15. So, your performance boost isn't necessarily going
    > to come from calling one method which does the same work as 15 did
    > previously, but in optimizing the code which actually does the work.
    >
    > --
    > HTH,
    > Kevin Spencer
    > ..Net Developer
    > Microsoft MVP
    > Big things are made up
    > of lots of little things.
    >
    > "dinoo" <> wrote in message
    > news:...
    > > Kevin,
    > > My concern is if both application using the same no of calls to database

    > and same code except the new application makes one call and gets the data in
    > one shot then i feel it should be atleast faster than the previous
    > application which use to make 15 calls to get this data.
    > >
    > > I could not understand why the new application is not faster than the

    > previous application?
    > >
    > > Thanks
    > >
    > > Dinesh
    > >
    > >
    > > "Kevin Spencer" wrote:
    > >
    > > > 1 MB of data is going to take some time to transmit over the Internet.

    > It's
    > > > called "Network Latency" and is one of the biggest issues that affects

    > speed
    > > > of the app on the client-side.
    > > >
    > > > --
    > > > HTH,
    > > > Kevin Spencer
    > > > ..Net Developer
    > > > Microsoft MVP
    > > > Big things are made up
    > > > of lots of little things.
    > > >
    > > > "dinoo" <> wrote in message
    > > > news:...
    > > > > Hi, I am posting this here as I might receive reply from here.
    > > > >
    > > > > I am having a strange problem in webservices.
    > > > >
    > > > > Initially we had an application which use to make about 15 different
    > > > webservice calls to load one windows form.
    > > > > We decided to make it one and now we are calling one webmethod.
    > > > > This webmethod has the implementation of getting all the data in one

    > shot.
    > > > >
    > > > > But we are running in a problem that the data which is being

    > transfered in
    > > > new application is going around 1 MB. And thus even if we compare the

    > old
    > > > application with the new application the performance improvement is

    > null.
    > > > >
    > > > > I know i could use soap extension to compress and decompress the data
    > > > being passed between client and server.
    > > > > But i could not understand why there is no performance gain in

    > getting
    > > > all the data in one shot in current case.
    > > > >
    > > > > I am testing this application on local machine. But still i feel i

    > should
    > > > get some performance benefit.
    > > > >
    > > > > Can anybody point out what should be remedy for this?
    > > > > I went through the msdn aricle on the checklist for the webservice
    > > > performance improvement. But I feel as both the application using the

    > same
    > > > architecture, I should receive some performance gain in new application.
    > > > >
    > > > > Please help.
    > > > >
    > > > > Thanks
    > > > >
    > > > > Dinoo
    > > >
    > > >
    > > >

    >
    >
    >
     
    =?Utf-8?B?ZGlub28=?=, Jul 3, 2004
    #4
  5. > But making 15 calls adds serializing soap requests and responses on client
    as well as on server. Switching them to one should ease some network load,
    resulting into
    > faster response.


    Uncle Chutney says "Big things are made up of lots of little things." In
    this case you can interpret Chutney's law as, you may save a couple of
    hundred bucks on a really good deal, but that isn't going to make you rich
    if your bank vault has a hole in it, and an army of squirrels is taking your
    money out one bill at a time to build their nests.

    IOW, optimization is not achieved by looking at one possible option, but by
    being detail-oriented about all of the possible optimization opportunities
    you have in your app.

    As far as compression, I can't advise you. I have never used it with SOAP
    (never had that much data coming out). I CAN tell you that using compression
    is a trade-off. It takes a good bit of processing and memory just to
    compress data. So, you need to answer for yourself the question of whether
    on balance you're getting faster or slower code by your compression
    technique.

    As far as ADO.Net is concerned, again, you can certainly implement
    optimization in your code, manage Connection Pooling, use the right classes,
    but you also have a number of other things to look at as well, such as using
    and optimizing Stored Procedures, and even the normalization and tuning of
    your database.

    --
    HTH,
    Kevin Spencer
    ..Net Developer
    Microsoft MVP
    Big things are made up
    of lots of little things.

    "dinoo" <> wrote in message
    news:...
    > I are absulutely right Kevin.
    > Optimization would be my next task.
    >
    > But making 15 calls adds serializing soap requests and responses on client

    as well as on server. Switching them to one should ease some network load,
    resulting into
    > faster response.
    >
    > I also would like to know if I go for the compression with soap

    extentions, which would be the right library i should go for the
    compression?, I tried the ShareZip and J# library but if the data is very
    huge these libraries decompress wrong xml content resulting into failure.
    >
    > Can you suggest me any better library which compresses and decopresses

    large string content without failure?
    >
    > Also suggest what should be taken care in ado.net code to achive faster

    response from SQL Server.
    > I am using stored procedures.
    >
    > Thanks
    >
    > dinoo
    >
    > "Kevin Spencer" wrote:
    >
    > > Optimization is one of the most challenging aspects of programming. I'm

    not
    > > sure how you're measuring performance here, but there are any number of
    > > reasons why you may not have seen a performance boost, or perceived no
    > > performance boost. For example, you mentioned that you originally called

    15
    > > WebMethods to get data. Now, you are calling one. However, you're still
    > > getting the same data. And, in fact, that one WebMethod is now doing the
    > > work of the previous 15. So, your performance boost isn't necessarily

    going
    > > to come from calling one method which does the same work as 15 did
    > > previously, but in optimizing the code which actually does the work.
    > >
    > > --
    > > HTH,
    > > Kevin Spencer
    > > ..Net Developer
    > > Microsoft MVP
    > > Big things are made up
    > > of lots of little things.
    > >
    > > "dinoo" <> wrote in message
    > > news:...
    > > > Kevin,
    > > > My concern is if both application using the same no of calls to

    database
    > > and same code except the new application makes one call and gets the

    data in
    > > one shot then i feel it should be atleast faster than the previous
    > > application which use to make 15 calls to get this data.
    > > >
    > > > I could not understand why the new application is not faster than the

    > > previous application?
    > > >
    > > > Thanks
    > > >
    > > > Dinesh
    > > >
    > > >
    > > > "Kevin Spencer" wrote:
    > > >
    > > > > 1 MB of data is going to take some time to transmit over the

    Internet.
    > > It's
    > > > > called "Network Latency" and is one of the biggest issues that

    affects
    > > speed
    > > > > of the app on the client-side.
    > > > >
    > > > > --
    > > > > HTH,
    > > > > Kevin Spencer
    > > > > ..Net Developer
    > > > > Microsoft MVP
    > > > > Big things are made up
    > > > > of lots of little things.
    > > > >
    > > > > "dinoo" <> wrote in message
    > > > > news:...
    > > > > > Hi, I am posting this here as I might receive reply from here.
    > > > > >
    > > > > > I am having a strange problem in webservices.
    > > > > >
    > > > > > Initially we had an application which use to make about 15

    different
    > > > > webservice calls to load one windows form.
    > > > > > We decided to make it one and now we are calling one webmethod.
    > > > > > This webmethod has the implementation of getting all the data in

    one
    > > shot.
    > > > > >
    > > > > > But we are running in a problem that the data which is being

    > > transfered in
    > > > > new application is going around 1 MB. And thus even if we compare

    the
    > > old
    > > > > application with the new application the performance improvement is

    > > null.
    > > > > >
    > > > > > I know i could use soap extension to compress and decompress the

    data
    > > > > being passed between client and server.
    > > > > > But i could not understand why there is no performance gain in

    > > getting
    > > > > all the data in one shot in current case.
    > > > > >
    > > > > > I am testing this application on local machine. But still i feel i

    > > should
    > > > > get some performance benefit.
    > > > > >
    > > > > > Can anybody point out what should be remedy for this?
    > > > > > I went through the msdn aricle on the checklist for the webservice
    > > > > performance improvement. But I feel as both the application using

    the
    > > same
    > > > > architecture, I should receive some performance gain in new

    application.
    > > > > >
    > > > > > Please help.
    > > > > >
    > > > > > Thanks
    > > > > >
    > > > > > Dinoo
    > > > >
    > > > >
    > > > >

    > >
    > >
    > >
     
    Kevin Spencer, Jul 6, 2004
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. WJ
    Replies:
    2
    Views:
    377
    =?Utf-8?B?ZGlub28=?=
    Jul 2, 2004
  2. Steve Drake

    Re: Webservice Performance Issue

    Steve Drake, Jul 5, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    901
    Steve Drake
    Jul 5, 2004
  3. batista
    Replies:
    1
    Views:
    965
    Laurent Bugnion
    Jan 26, 2006
  4. batista
    Replies:
    0
    Views:
    588
    batista
    Jan 26, 2006
  5. Mr. x
    Replies:
    2
    Views:
    742
    Andrew
    Oct 10, 2003
Loading...

Share This Page