0

I leave Ask Ubuntu and other sites open overnight - and today I got back and there were almost 300 questions in this bar:

I clicked on it, and it took 16 seconds to load all of them - which seems like a long time (for me) and it must be putting some load on the server (not much, but as each request is normally milliseconds...).

I seem to remember reading that the server renders the page (not an expert - not sure what this means) but it seems to me that the server is rendering the page with the first (oldest) new question, then the second and so on.

This means it is rendering 300 questions, and then showing every single one on the page - that page has 342 questions on it now. Normally there are 48.

Is there some way the server could limit the page size it sends to me - to speed up loading all these questions?

1

Speed

there were almost 300 new questions. I clicked on it, and it took 16 seconds to load all of them

Some speculation/guesswork here, but the general principle will be close enough to get the point over.

  • A script is run - probably a handful of them
  • A database and table is accessed - probably a handful of them
  • Data is retrieved and served to your browser
  • Network connection and delay also involved for data transfer
  • Possibly a few other things happen

Likely some of the scripts and possibly data are cached/in memory/etc (certainly indexed DB data), but still considering the above list, now consider:

16 / 300 = 0.053333

5 hundredths of a second to get and display each question, which is data you have never retrieved before - i.e. no (not much) data cache on your end.

Given the plethora of users loading the question page alone, let alone other scripts and queries all over the site by users doing different things but hitting the same databases/table/scripts:

Why does it take so long

It doesn't ;)


Your request

Is there some way the server could limit the page size it sends to me - to speed up loading all these questions?

Albeit the total 16 seconds to load a page can be argued as a long time, to be fair you actively clicked on: "Please show me these 300 questions" and the site showed you them.

If you want pagination, then refresh the page, or click the "Questions" link/tab to get recent questions.

The site did what you asked, and I like the fact the sites (nearly always) do what it says on the tin, in a logical and mostly techy way.


Suggested changes

End user to readdress interaction :D

  • :P other places would limit the page size - for example the API would give all of them, in pages... It should return the newest 50, I think, rather than a 350 long page... Even 24 takes 1.5 seconds... – Tim Jun 3 '15 at 16:13

You must log in to answer this question.

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