Martin Brennan
6f978bc95c
FIX: First pass to improve efficiency of secure uploads rake task ( #9284 )
...
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
..
2019-05-13 09:31:32 +08:00
2020-03-15 17:24:11 +11:00
2019-12-12 11:45:00 +00:00
2020-01-23 14:44:00 -03:00
2019-05-13 16:37:47 +01:00
2019-05-13 09:31:32 +08:00
2019-05-13 09:31:32 +08:00
2019-05-13 09:31:32 +08:00
2020-03-17 15:15:22 +10:00
2019-05-13 09:31:32 +08:00
2019-05-13 09:31:32 +08:00
2019-07-18 19:15:01 -06:00
2019-05-13 09:31:32 +08:00
2020-03-04 16:59:49 +01:00
2019-07-18 19:15:01 -06:00
2019-12-10 16:11:49 +00:00
2020-03-11 12:48:10 -04:00
2019-05-13 09:31:32 +08:00
2019-10-23 17:27:14 +11:00
2019-05-13 09:55:44 +08:00
2019-05-13 09:31:32 +08:00
2019-05-13 09:31:32 +08:00
2020-01-17 17:24:49 +01:00
2019-10-30 16:54:35 +11:00
2019-05-13 09:31:32 +08:00
2020-02-04 15:34:46 +01:00
2019-10-04 09:47:33 +10:00
2020-03-19 19:30:08 +01:00
2019-09-22 05:18:48 -07:00
2019-10-21 12:08:20 +01:00
2020-01-07 12:22:58 +00:00
2019-12-03 10:05:53 +01:00
2019-12-05 11:53:10 -05:00
2019-05-13 09:31:32 +08:00
2020-03-26 07:16:02 +10:00
2019-08-01 09:12:05 +01:00
2019-05-13 09:31:32 +08:00
2019-05-13 09:31:32 +08:00
2019-10-24 17:48:15 +02:00
2019-05-13 09:31:32 +08:00
2019-05-13 09:31:32 +08:00
2019-07-04 14:33:05 -04:00
2019-11-18 11:25:42 +10:00
2019-06-27 15:49:21 +01:00
2019-12-03 10:05:53 +01:00
2020-03-26 15:59:57 +10:00
2019-05-13 09:31:32 +08:00
2019-05-13 09:31:32 +08:00