When an activity happens on a project and the create_timelines
task is run, that executes ActivityStream's Aggregator.create_timeline
. In a case where there are no new records for some reason, then it calls get_timeline
. This can be a problem because the pre-computed "timeline" there could potentially be thousands or millions of records. This takes a while and can take up a ton of memory which doesn't get reclaimed after the task is done.
We should evaulate if that behavior is correct. If it is needed, we should pass a limit
parameter in.
Also perhaps see if we can figure out why these records aren't being garbage collected.
Query removal in https://sourceforge.net/p/activitystream/code/ci/db/8006/~/tree/
Memory usage seems like it should be managed properly, at least from the Ming perspective. We use the ming storage option for activitystream, and so the ming session gets registered globally, and all its ORM objects get cleaned up via
MingMiddleware
at the end of each request/task.