You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Index children arrays to remove quadratic time complexity (#135)
After profiling a call, I saw that more than half of the time
was spent in a single `has_one` sideload. The existing code has a couple
of cases of nested loops which were at the root of this. Replacing the
inner loops with Hash lookups caused my request time to go from >3.5s to
~1s (at which point, a lot of that is dependent on latency from upstream
resources and Rails itself).
0 commit comments