Click here to Skip to main content
15,891,136 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hey!

I was wondering if someone of you can help me:
I have a hotel search engine (connected to the API of Expedia)
The loading procedure is like this:
- user comes to the page (just the header is visible) and after document is loaded I make the first AJAX request to a function which gets the first 60 results of the search request
- in this function I deserialize the JSON response, load the results in strings and then I form a complete html string which will get passed back to the view.

This procedure is really slow :(
Can someone give me an advice how to do to speed up the whole thing?

thanks in advance!!!
Cheers
Arthur
Posted
Comments
Kornfeld Eliyahu Peter 19-May-14 2:52am    
Try break the process in to part and identify which one is slow...
Member 9500954 19-May-14 3:19am    
Hey! thanks for your reply. Do you think that it will speed up if i am building the html on the client side?
Oliver Bleckmann 19-May-14 3:31am    
well, deserializing json should not be an issue. depending on your html and the way you construct it (e.g. use string builder) may be a minor issue (as you are not doing any stress/ load tests, where this becomes important). so there is the request of expedia data to be measured (json data) and the time of the response, your html data, to the client. as I assume, you are testing locally, the client gets it's data as fast as possible. so I bet the request to expedia is your bottleneck. measure that! but sadly to say, if their api has a extra ordenary response time, you can do nothing to improve that. but maybe you can gain higher priority for money.
Member 9500954 19-May-14 10:56am    
thanks for your reply.
Hmm, when I am using the apitester of Expedia and make the same request I am getting a response in less than 2 seconds.
What is in your opinion better: forming the html on server side or on client side?
Thanks

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900