Commit Graph

7145 Commits

Author SHA1 Message Date
Brion Vibber
fa0fbd0118 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              |
+----+-------------+--------------+--------+------------------------------------+---------+---------+-------------------------------+--------+--------------------------+
2009-12-22 20:30:41 -08:00
Brion Vibber
eab6d1c954 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              |
+----+-------------+--------------+--------+------------------------------------+---------+---------+-------------------------------+--------+--------------------------+
2009-12-22 20:18:27 -08:00
Evan Prodromou
f6bf952980 Merge branch 'testing' 2009-12-22 16:44:19 -08:00
Evan Prodromou
30c2e2ce83 update to rc2 2009-12-22 16:41:39 -08:00
Evan Prodromou
d708e40be2 update README for 0.9.0rc2 2009-12-22 16:41:07 -08:00
Brion
38877a4922 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.
2009-12-22 16:24:01 -08:00
Siebrand Mazeland
6aa4a555dc Merge branch '0.9.x' of git://gitorious.org/statusnet/mainline into 0.9.x 2009-12-23 00:17:05 +01:00
Craig Andrews
6549e4779a First version of a CAS authentication plugin 2009-12-22 17:53:24 -05:00
Siebrand Mazeland
4e60043768 Localisation updates for !StatusNet from !translatewiki.net !sntrans 2009-12-22 23:48:18 +01:00
Evan Prodromou
a2cb0a033f Merge branch '0.9.x' of git@gitorious.org:statusnet/mainline into 0.9.x 2009-12-22 08:53:50 -08:00
Evan Prodromou
f170164701 remove some merge cruft from README 2009-12-22 08:53:20 -08:00
Brion Vibber
c9c316db7f Ticket 2083: use site.textlimit setting instead of hardcoding 140 into documentation 2009-12-22 07:03:48 -08:00
Sarven Capadisli
83779afe41 Adjusted notice option alignment in MobileProfile 2009-12-22 00:06:59 +00:00
Sarven Capadisli
4c91f6bbfd Moving & replacing to the end of html and source data 2009-12-21 23:19:34 +00:00
Sarven Capadisli
ca67826831 Merge branch '0.9.x' of git@gitorious.org:statusnet/mainline into 0.9.x 2009-12-21 22:07:59 +00:00
Sarven Capadisli
1600ae9679 Right aligned delete notice option so that when repeat option is
present there is a consistent layout
2009-12-21 22:06:49 +00:00
Siebrand Mazeland
1166d522fb Localisation updates for !StatusNet from !translatewiki.net !sntrans 2009-12-21 22:23:36 +01:00
Brion Vibber
a06af3f125 Ticket 1982: define LC_MESSAGES and friends if PHP didn't predefine them for us. (Known problem on Win32) 2009-12-21 09:06:07 -08:00
Sarven Capadisli
5472779240 Added admin navigation item to MobileProfile 2009-12-21 15:09:12 +00:00
Brion Vibber
f987273f11 Ignore user language settings that aren't listed in language config; we'll then fall back to current autodetection. This prevents the surprises where your profile suddenly switches to Arabic because it was selected by default due to lack of a match in the drop-down box. 2009-12-21 06:57:10 -08:00
Siebrand Mazeland
0957c9fa4b Remove pleonasm in UI text 2009-12-20 20:20:35 +01:00
Siebrand Mazeland
7e6efd1065 Localisation updates for !StatusNet from !translatewiki.net !sntrans
* Adding Persian language
2009-12-20 15:52:43 +01:00
Siebrand Mazeland
b7b8e16097 Localisation updates for !StatusNet from !translatewiki.net !sntrans 2009-12-20 10:41:10 +01:00
Brion Vibber
b244ac6462 Ignore user language settings that aren't listed in language config; we'll then fall back to current autodetection. This prevents the surprises where your profile suddenly switches to Arabic because it was selected by default due to lack of a match in the drop-down box. 2009-12-19 15:29:53 -05:00
Craig Andrews
a43c310fbc Cache the LDAP schema in memcache (if memcache is available) 2009-12-19 15:10:57 -05:00
Eric Helgeson
4002c18065 Allow caching of ldap schema, greatly improves performance. 2009-12-18 18:27:45 -06:00
Eric Helgeson
490238faf6 search->count() doesnt seem to be cached, so we will 2009-12-18 18:27:15 -06:00
Eric Helgeson
f70c3b6ae9 Limit search to only the basedn we're looking in 2009-12-18 18:26:41 -06:00
Jeffery To
c17d7b671d Set returnto when redirected to login of a private install (for 0.9.x)
Can't use returnToArgs() because we don't have an action object yet.
2009-12-18 09:46:15 -05:00
Brion Vibber
2fb76eec62 Followup fix for ticket 1672: Twitter bridge !group->#hash conversion will now happen regardless of whether account was configured with oauth or basic auth (previously applied only on the oauth path) 2009-12-18 09:38:25 -05:00
Brion Vibber
8632974131 Followup fix for ticket 1672: Twitter bridge !group->#hash conversion will now happen regardless of whether account was configured with oauth or basic auth (previously applied only on the oauth path) 2009-12-18 09:36:30 -05:00
Brion Vibber
dd96558b66 Make useremail.php executable 2009-12-17 16:41:45 -05:00
Christopher Vollick
cc2b2a82da Added UserEmail script.
Used to query user's emails.

Mostly used for administration, to see if a user requesting something is who they say.

Also, some people assume that the admin knows this data, and says things like:
"If you could do _____ with the account connected to this email".

It'd be nice if we could do that without raw SQL.
2009-12-17 16:41:38 -05:00
Sarven Capadisli
c9d64c3489 Minor style 2009-12-17 15:35:07 -05:00
Sarven Capadisli
31f2079490 Merge branch '0.9.x' of git@gitorious.org:statusnet/mainline into 0.9.x 2009-12-17 15:29:44 -05:00
Sarven Capadisli
bf123d1461 Plugin that outputs 'powered by StatusNet' after site name 2009-12-17 15:28:50 -05:00
Evan Prodromou
51838a969b Merge branch 'testing' of git@gitorious.org:statusnet/mainline into testing 2009-12-16 22:22:29 -05:00
Evan Prodromou
530673b3cd Merge branch '0.9.x' into testing 2009-12-16 22:14:41 -05:00
Siebrand Mazeland
7ee875b10f Localisation updates for !StatusNet from !translatewiki.net !sntrans 2009-12-16 23:57:10 +01:00
Brion Vibber
dc4bedd25a Add some doc comments and fixmes in util.php 2009-12-16 09:27:48 -05:00
Brion Vibber
0ca80f78fb Add doc comments listing the array parameters for User::register() and Notice::saveNew() 2009-12-16 09:27:48 -05:00
Brion Vibber
a998bda4a5 Fix UserRightsTest unit tests 2009-12-16 09:27:48 -05:00
Brion Vibber
0158f4f73d PHP 5.3 closure-based implementation of curry(); old implementation used as fallback for older PHP versions. Added unit tests to confirm they both work! 2009-12-16 09:27:48 -05:00
Brion Vibber
00fb5feff8 Cleanup undefined variable notice: set a couple more null defaults for new params in Notice::saveNew().
Fixes this notice seen while using AJAX repeat button:
Notice: Undefined variable: uri in classes/Notice.php on line 243
2009-12-16 09:27:48 -05:00
Brion Vibber
e2e1843639 slight cleanup for a bit in Notice.php where a var was reused for different types, confusing tracking down a bug 2009-12-16 09:27:47 -05:00
Evan Prodromou
2a1468ec8b Merge branch '0.9.x' into testing 2009-12-15 16:24:52 -05:00
Evan Prodromou
f3d27cc3ae can't repeat your own notice posted through realtime 2009-12-15 16:19:11 -05:00
Evan Prodromou
608d1b206a Don't show repeater avatar in notice lists 2009-12-15 16:08:44 -05:00
Evan Prodromou
d6873beb9b make realtime plugin grok repeats 2009-12-15 15:47:37 -05:00
Sarven Capadisli
80b5a7fe60 Added .form_repeat notice option to received notices in Realtime plugin 2009-12-15 19:44:20 +00:00