1

I've been playing with some queries on the documentation page, and I've noticed that it's taking an abnormally long time to load even reasonably sized API call results:

https://api.stackexchange.com/docs/sites#pagesize=50&filter=default&run=true

On my browser (Chrome 17.0.963.56 on OSX 10.6.8, although I also tested this on Windows Chrome/Firefox latest with the same results), getting the JSON data takes about 10 msec, but displaying the results takes almost 30 additional seconds. Trying to load all the sites (ie, pagesize is some arbitrarily high number) takes minutes. During this time, the browser tab is unresponsive - I can't click on anything or scroll the page.

I don't remember it being this bad a month or so ago when I was heavily involved in writing my other applications, but it seems to have gotten worse in perhaps the last two weeks.

1
  • This is being worked on, but it's slow going. Basically, prettify blocks; we have to pull some calisthenics to work around this. You don't see this on the sites properly because the code samples are so much smaller than the API results. Commented Feb 19, 2012 at 5:58

1 Answer 1

1

Turns out prettify was not at fault here, we just had some really worse-case usage of jQuery floating around.

We're coloring and marking up several kilobytes of JSON, and there's a limit to how quickly we can make that work client side. Our resident jQuery expert (Nick Craver) took a whack at speeding it up, and most of the low hanging fruit has been cleared out.

It's still not a bed of roses, but the console javascript should be much faster now.

You must log in to answer this question.

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