Martin Brennan 6f978bc95c
FIX: First pass to improve efficiency of secure uploads rake task ()
Get rid of harmful each loop over uploads to update. Instead we put all the unique access control posts for the uploads into a map for fast access (vs using the slow .find through array) and look up the post when it is needed when looping through the uploads in batches.

On a Discourse instance with ~93k uploads, a simplified version of the old method takes > 1 minute, and a simplified version of the new method takes ~18s and uses a lot less memory.
2020-03-26 15:59:57 +10:00
..
2020-01-15 11:27:12 +01:00
2019-10-21 12:08:20 +01:00
2019-05-22 17:39:44 +03:00
2020-03-05 16:10:28 -05:00