• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Performance optimization in Web Service code

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello Guys,

I am working on web application, which open a pop up when it starts. Data required for this pop up come by webservice. This webservice execute query in DB and return a instance of UserDefined class. I get data from this userdefined instance.

Problem is: this web service is very slow, Some times I got response in appx. 10 second. I need to do some performance optimization in web service code. So Please suggest me, where I can optimize code?

Doubt: 1) It is a good practice to send directly object in web service response instead jason object or XML in web service response?
2) what should be waiting time for web service response?

Please reply.
Thanks in advance!!!
Saurabh
 
Ranch Hand
Posts: 645
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
very open ended question, you first need to find out whats taking long? I suspect it to be query but its just wild guess, try to mock (Dont call actuall db but send dumy object) the database call and see if there is improvement like wise mock each possible layer.
if client is web how are you passing object back? it has to be xml or json.

use some profiling tool to find out where is the bottleneck.
 
I am going down to the lab. Do NOT let anyone in. Not even this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic