Commit a3d05d91 authored by Alex Kalderimis's avatar Alex Kalderimis

Use batches of 100

This is much better from a performance point of view - batches of 500
take a long time (55sec) but we can run batches of 100 in under 60ms.
parent d17dcf89
......@@ -18,7 +18,7 @@ class IssueRebalancingService
start = RelativePositioning::START_POSITION - (gaps / 2) * gap_size
Issue.transaction do
indexed_ids.each_slice(500) { |pairs| assign_positions(start, pairs) }
indexed_ids.each_slice(100) { |pairs| assign_positions(start, pairs) }
end
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment