mcribbs / lastreadpost

Automatically exported from code.google.com/p/lastreadpost
0 stars 0 forks source link

Make only one XMLHttpRequest instead of one per thread #6

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
In an effort to reduce the number of database connections and queries I
make running the LRP script, I thought it would be a good idea to batch all
the "get" requests into a single query.

I added a "getbulk" action which takes a list of keys (one per line), and
returns the same data as "get" (but again, one per line).  The rest of the
link creating code is the same.

It seems to speed up getting the posts, they now all appear at the same
time instead of one at a time.

The (sloppily made) code changes are attached.

Original issue reported on code.google.com by arhug...@gmail.com on 18 Jun 2007 at 8:04

Attachments:

GoogleCodeExporter commented 9 years ago
Just saw this... I'll take a look

Original comment by mcri...@gmail.com on 6 Sep 2007 at 5:31