Sarven Capadisli [Thu, 31 Dec 2009 16:19:49 +0000 (16:19 +0000)]
If UA doens't support navigation.geolocation or have JavaScript
enabled, the user should still be able to enable/disable their share
location setting per notice.
Sarven Capadisli [Thu, 31 Dec 2009 14:34:07 +0000 (14:34 +0000)]
If user is sharing their location (based on profile setting), then
enable it for form notice by default. This can be overriden by the
cookie to preserve states.
Sarven Capadisli [Thu, 31 Dec 2009 14:24:27 +0000 (14:24 +0000)]
If user doesn't want to share their location (which is globally set
from their profile settings), don't bother to output form data for
lat/long in the notice form.
Craig Andrews [Thu, 31 Dec 2009 00:29:38 +0000 (19:29 -0500)]
Enable memcache automatic compression, starting at 20k and only if compression gain is greater than 20%.
Allows storage of larger objects (over 1mb in size uncompressed), such as huge LDAP schemas.
Should also improve cache efficiency (allows more stuff to be stored in same memory) and reduce network latency (less data transfer)
Brion Vibber [Tue, 29 Dec 2009 22:30:15 +0000 (14:30 -0800)]
If we got an identified location at ajax check time, renormalize lat/lon and naming. This'll match other displays of the names more consistently (Opera Plaza, San Francisco, CA, US instead of Opera Plaza, US)
Craig Andrews [Tue, 29 Dec 2009 22:12:52 +0000 (17:12 -0500)]
Revert "Revert "Drop the Google Client API-based AJAX geolocation lookup shim -- it fails to ask for user permission, causing us quite a bit of difficulty.""
Evan Prodromou [Mon, 28 Dec 2009 23:13:15 +0000 (15:13 -0800)]
Move location-argument-handling code into a single function
Moved the important parts of the location-argument-handling stuff
to a single function. Handles defaults and overrides correctly, and
easy to use. Changed Web and API channels to use it.
Evan Prodromou [Mon, 28 Dec 2009 20:42:22 +0000 (12:42 -0800)]
First version of blacklist plugin
First version of blacklist plugin. Replaces custom code in identi.ca's
config.php, which was getting scary and long. Also correctly handles
changed nicknames or URLs in profile settings and using 'forbidden'
URLs in notice text.
Evan Prodromou [Wed, 23 Dec 2009 20:09:11 +0000 (12:09 -0800)]
Convert Geonames plugin to use XML API instead of JSON
The XML API for Geonames contains much more detailed error information
than the JSON one. So, I've converted this plugin to use it instead.
It seems to be the preferred format for Geonames, so biting the bullet
on this makes sense.
Brion Vibber [Wed, 23 Dec 2009 04:18:27 +0000 (20:18 -0800)]
Fix for massively slow friends timeline query due to indexing bug introduced with repeats.
Sorting on notice.id when our primary selector was notice_inbox.user_id caused a filesort and table scan of the notice table.
Switchng to notice_inbox's notice_id means we can use our index, and everything comes right up.
Before:
mysql> explain SELECT notice.id AS id FROM notice JOIN notice_inbox ON notice.id = notice_inbox.notice_id WHERE notice_inbox.user_id = 18574 AND notice.repeat_of IS NULL ORDER BY notice.id DESC LIMIT 61 OFFSET 0;
+----+-------------+--------------+--------+------------------------------------+---------+---------+-------------------------------+--------+----------------------------------------------+
| id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra |
+----+-------------+--------------+--------+------------------------------------+---------+---------+-------------------------------+--------+----------------------------------------------+
| 1 | SIMPLE | notice_inbox | ref | PRIMARY,notice_inbox_notice_id_idx | PRIMARY | 4 | const | 102600 | Using index; Using temporary; Using filesort |
| 1 | SIMPLE | notice | eq_ref | PRIMARY | PRIMARY | 4 | stoica.notice_inbox.notice_id | 1 | Using index |
+----+-------------+--------------+--------+------------------------------------+---------+---------+-------------------------------+--------+----------------------------------------------+
After:
mysql> explain SELECT notice.id AS id FROM notice JOIN notice_inbox ON notice.id = notice_inbox.notice_id WHERE notice_inbox.user_id = 18574 AND notice.repeat_of IS NULL ORDER BY notice_id DESC LIMIT 61 OFFSET 0;
+----+-------------+--------------+--------+------------------------------------+---------+---------+-------------------------------+--------+--------------------------+
| id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra |
+----+-------------+--------------+--------+------------------------------------+---------+---------+-------------------------------+--------+--------------------------+
| 1 | SIMPLE | notice_inbox | ref | PRIMARY,notice_inbox_notice_id_idx | PRIMARY | 4 | const | 102816 | Using where; Using index |
| 1 | SIMPLE | notice | eq_ref | PRIMARY,notice_repeatof_idx | PRIMARY | 4 | stoica.notice_inbox.notice_id | 1 | Using where |
+----+-------------+--------------+--------+------------------------------------+---------+---------+-------------------------------+--------+--------------------------+
Brion Vibber [Wed, 23 Dec 2009 04:18:27 +0000 (20:18 -0800)]
Fix for massively slow friends timeline query due to indexing bug introduced with repeats.
Sorting on notice.id when our primary selector was notice_inbox.user_id caused a filesort and table scan of the notice table.
Switchng to notice_inbox's notice_id means we can use our index, and everything comes right up.
Before:
mysql> explain SELECT notice.id AS id FROM notice JOIN notice_inbox ON notice.id = notice_inbox.notice_id WHERE notice_inbox.user_id = 18574 AND notice.repeat_of IS NULL ORDER BY notice.id DESC LIMIT 61 OFFSET 0;
+----+-------------+--------------+--------+------------------------------------+---------+---------+-------------------------------+--------+----------------------------------------------+
| id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra |
+----+-------------+--------------+--------+------------------------------------+---------+---------+-------------------------------+--------+----------------------------------------------+
| 1 | SIMPLE | notice_inbox | ref | PRIMARY,notice_inbox_notice_id_idx | PRIMARY | 4 | const | 102600 | Using index; Using temporary; Using filesort |
| 1 | SIMPLE | notice | eq_ref | PRIMARY | PRIMARY | 4 | stoica.notice_inbox.notice_id | 1 | Using index |
+----+-------------+--------------+--------+------------------------------------+---------+---------+-------------------------------+--------+----------------------------------------------+
After:
mysql> explain SELECT notice.id AS id FROM notice JOIN notice_inbox ON notice.id = notice_inbox.notice_id WHERE notice_inbox.user_id = 18574 AND notice.repeat_of IS NULL ORDER BY notice_id DESC LIMIT 61 OFFSET 0;
+----+-------------+--------------+--------+------------------------------------+---------+---------+-------------------------------+--------+--------------------------+
| id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra |
+----+-------------+--------------+--------+------------------------------------+---------+---------+-------------------------------+--------+--------------------------+
| 1 | SIMPLE | notice_inbox | ref | PRIMARY,notice_inbox_notice_id_idx | PRIMARY | 4 | const | 102816 | Using where; Using index |
| 1 | SIMPLE | notice | eq_ref | PRIMARY,notice_repeatof_idx | PRIMARY | 4 | stoica.notice_inbox.notice_id | 1 | Using where |
+----+-------------+--------------+--------+------------------------------------+---------+---------+-------------------------------+--------+--------------------------+
Brion [Tue, 22 Dec 2009 23:08:44 +0000 (15:08 -0800)]
Skip DB_DataObject's in-process cache for static gets on CLI processes.
The local process cache would grow forever, keeping things stuck in memory and preventing GC.