Load queries asynchronously to leverage concurrency

This commit is contained in:
Jorge Manrubia
2025-04-03 13:28:14 +02:00
parent 5a2b7c5abd
commit 49ef811d25
+3 -3
View File
@@ -12,9 +12,9 @@ class BubblesController < ApplicationController
RECENTLY_POPPED_LIMIT = 100 RECENTLY_POPPED_LIMIT = 100
def index def index
@considering_bubbles = @filter.bubbles.considering @considering_bubbles = @filter.bubbles.considering.load_async
@doing_bubbles = @filter.bubbles.doing @doing_bubbles = @filter.bubbles.doing.load_async
@popped_bubbles = @filter.with(indexed_by: "popped").bubbles.limit(RECENTLY_POPPED_LIMIT) @popped_bubbles = @filter.with(indexed_by: "popped").bubbles.limit(RECENTLY_POPPED_LIMIT).load_async
end end
def create def create