Commit Graph

11 Commits

Author SHA1 Message Date
Evan Prodromou 4092ee1bd1 Squashed commit of the following:
commit bd23a7da105d635414643dfcedd9c8f710d565b8
Author: Evan Prodromou <evan@e14n.com>
Date:   Sat Jun 29 07:49:03 2013 -0400

    Make the after flag work correctly

commit 5c5845a2f866f0bbffedd8e2e5d1f512f87d5329
Author: Evan Prodromou <evan@e14n.com>
Date:   Sat Jun 29 06:14:43 2013 -0400

    Add an 'after' flag for backup script
2013-06-29 07:49:43 -04:00
Evan Prodromou 393130d80f Add direct messages to backup 2013-06-08 17:53:47 -04:00
Evan Prodromou cbb5586ab7 Add a registration activity to the end of every backup 2013-06-02 14:38:00 -04:00
Evan Prodromou 2a3abf8850 Close the collection object 2013-05-29 17:03:08 -04:00
Evan Prodromou 2f5cdbb9c1 Correctly output commas for JSON backups 2013-05-29 16:45:52 -04:00
Evan Prodromou 4f818c5c81 Add JSON output for backups 2013-05-24 13:50:24 -04:00
Evan Prodromou bf18684509 More aggressively avoid OOM errors in useractivitystream 2013-05-24 09:19:17 -04:00
Brion Vibber 55b1f3d84c Scalability work on user backup stream generation.
UserActivityStream -- used to create a full activity stream including subscriptions, favorites, notices, etc -- normally buffers everything into memory at once. This is infeasible for accounts with long histories of serious usage; it can take tens of seconds just to pull all records from the database, and working with them all in memory is very likely to hit resource limits.
This commit adds an alternate mode for this class which avoids pulling notices until during the actual output. Instead of pre-sorting and buffering all the notices, empty spaces between the other activities are filled in with notices as we're making output. This means more smaller queries spread out during operations, and less stuff kept in memory.

Callers (backupaccount action, and backupuser.php) which can stream their output pass an $outputMode param of UserActivityStream::OUTPUT_RAW, and during getString() it'll send straight to output as well as slurping the notices in this extra funky fashion.
Other callers will let it default to the OUTPUT_STRING mode, which keeps the previous behavior.

There should be a better way to do this, swapping out the stringer output for raw output more consitently.
2011-02-25 12:15:38 -08:00
Siebrand Mazeland 7db24c32d6 * fix some i18n and L10n issues
* update/add translator documentation
* remove superfluous whitespace
2011-01-29 00:33:13 +01:00
Evan Prodromou aa9137ca71 preserve activities in object 2011-01-16 17:15:26 -05:00
Evan Prodromou 1ceb93cce4 move useractivitystream class to its own module 2010-09-15 15:18:01 -04:00