purchasePayment has quite an overhead compared to addPaymentMethod, even in the skip_gw case. In my testing, the overhead is between 100ms (p75) up to 350ms (p98).
Thoughts:
Instead of retrieving the transaction (get_kb_transaction), pass the external key as plugin properties? Or retrieve it lazily?
Lazily retrieve the last_transaction?
Speed up Response.create_response_and_transaction by bypassing as much as possible the ActiveRecord stack?
purchasePayment
has quite an overhead compared toaddPaymentMethod
, even in theskip_gw
case. In my testing, the overhead is between 100ms (p75) up to 350ms (p98).Thoughts:
get_kb_transaction
), pass the external key as plugin properties? Or retrieve it lazily?last_transaction
?Response.create_response_and_transaction
by bypassing as much as possible the ActiveRecord stack?