[OH-Dev] For the /people/ map: I've seen things you would not believe
Asheesh Laroia
asheesh at asheesh.org
Thu Jan 5 21:42:05 UTC 2012
Hey all,
I noticed the map at /people/ never loads.
Research indicates that the problem occurs when getting the location data
API endpoint, whose URL looks like this:
http://openhatch.org/+profile_api/location_data/?person_ids=2585,6691,430,...
Actually it lists all of the person IDs of all nearly 7000 registered
users of the site.
That URL has at least two problems:
1) This location_data API endpoint does at least one SQL query (or cache
lookup) query per user, which is just far too much. Now (as of
748b7db71b941cf9728dfb6254dbb8935d262c2b ) it does only one query at all,
and the test suite enforces this. (Yay!)
2) It is almost a 32KiB URL, which Apache (which we serve the site
through: mod_wsgi -> Apache -> nginx) refuses to respond to.
I'm going to add a small bit of code so that these long lists of IDs
are replaced by ranges. That should shrink the URL down to manageable
size.
-- Asheesh.
More information about the Devel
mailing list