I have an ASMX Web Service, which I am serving over HTTPS. After some testing, I arrived to the conclusion the Web Service would be intolerably slow in a real-world scenario.
I understand that the overhead of using HTTPS is unavoidable, but I would like to know how I could optimize this Web Service. The first thing I have noticed is that, most of the time, my Web Service returns lists of things, for example (not taken from the actual Web Service):
<Cars count="2">
<Car brand="Mercedes" registrationplate="612M0D0"/>
<Car brand="BMW" registrationplate="4RS-73CHN1C4"/>
</Cars>
(Usual real-life values of count
are around 40-50.)
Thus, both the element's type's name (in this example, Car
) and its attributes names (in this example, brand
and registrationplate
) are repeated too many times. All of this suggests compressing the SOAP response before sending it would a good idea. But I don't know to do it. Does anybody know?