2

I'm working with the API, but I noticed requests are quite slow. Each request seems to take between 8-11 seconds. I timed different requests and the time doesn't seem to differ much between search and getting a specific question for example.

Is it a performance problem on the backend or is it something on my side?

Edit

It seems there was some networking issues which I now fixed. However, search requests are still very slow and taking about 9 seconds. For instance:

http://api.stackoverflow.com/0.8/search/?key=&intitle=wpf
6
  • 1
    Search is known to have some performance issues. Part of the public beta is finding these wrinkles so we can iron them out. Commented May 22, 2010 at 23:26
  • I'm integrating quite extensive search client with stackoverflow through the api so I'd be glad to provide feedback. It's strange though since the search on the site is so much faster than the api
    – Homde
    Commented May 22, 2010 at 23:58
  • @Mattias - /search has been improved. I'm not going to say its fast yet, but its faster. Be aware that if you specify search terms that are very vague (large numbers of matches) the request will just naturally take longer. If you can use nottagged or multiple tags in tagged you'll probably get much faster responses. Commented May 23, 2010 at 8:32
  • Well, this is a general search tool so it's not my queries per se , but that of our users and of stackoverflow :) It does not seem to make much difference what the search query is, it always ends up in the 9-11 second range which we can agree is far too much in these days. The weird thing as I said is that the same queries on on the sites are quite fast, is it using any caching that the api isnt?
    – Homde
    Commented May 24, 2010 at 4:39
  • @Mattias - Your unrestricted intitle search is basically a worse case for /search. If you try ?tagged=wpf you'll get a response in 1/2 a second. If you're just doing text searches (no tags or excluded tags) you'll probably want to break out to your search provider of choice rather than use our API. Commented May 24, 2010 at 6:02
  • yeah.... but the search on the stackoverflow site does intitle searches and it's almost instant...
    – Homde
    Commented May 24, 2010 at 11:41

2 Answers 2

2

Nope. To help pinpoint the problem, visit my site:

http://m.stackoverflow.quickmediasolutions.com/user_list.php

If the page displays within a second or so, the path from your machine to api.stackoverflow.com is the problem. Otherwise, your network connection has a really high latency.

As a sidenote, my site has become a great diagnostic tool - an added benefit!

1
  • Hmm, yah, the page loads fast so must be something on my side. I'll better try to pinpoint whether it's a network or code issue :) Phew, better me than them :)
    – Homde
    Commented May 22, 2010 at 20:24
0

That's a problem with your application and the way you wrote it to interface with the API, I'm experiencing very fast response times

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .