mvols
mvols3w ago

Anyone have experience using the `Action

Anyone have experience using the Action Cache component? Im running into some pretty big slow downs when incorporating it when i hit an external api. Its about 6x slower on initial fetch (with no cache hit) when querying the external api with the action cache component - compared to before with no action cache. here are some logs showcasing the 6x latency:
[CONVEX A(actions/index:getPricing)] [LOG] 'Cached total duration: 12706ms [12.706secs]' // first call, no cache (12 seconds is dreadfully slow)
[CONVEX A(actions/index:getPricing)] [LOG] 'Cached total duration: 340ms [0.34secs]' // second call, cache (blazingly fast)

// same action call client side - without the action cache component being utilized
[CONVEX A(PokeData/actions:getPricing)] [LOG] 'Non Cached total duration: 2115ms [2.115secs]' // first call, straight action w/ no action cache
[CONVEX A(PokeData/actions:getPricing)] [LOG] 'Non Cached total duration: 2237ms [2.237secs]' // second call
[CONVEX A(actions/index:getPricing)] [LOG] 'Cached total duration: 12706ms [12.706secs]' // first call, no cache (12 seconds is dreadfully slow)
[CONVEX A(actions/index:getPricing)] [LOG] 'Cached total duration: 340ms [0.34secs]' // second call, cache (blazingly fast)

// same action call client side - without the action cache component being utilized
[CONVEX A(PokeData/actions:getPricing)] [LOG] 'Non Cached total duration: 2115ms [2.115secs]' // first call, straight action w/ no action cache
[CONVEX A(PokeData/actions:getPricing)] [LOG] 'Non Cached total duration: 2237ms [2.237secs]' // second call
1 Reply
mvols
mvolsOP3w ago
A little more insight - when logging the total duration of the handler within my pricing action:
4/7/2025, 8:12:39 AM [CONVEX A(actions/index:getPricingInternal)] [LOG] 'hitting a transaction response'
4/7/2025, 8:12:48 AM [CONVEX A(actions/index:getPricingInternal)] [LOG] 'Internal total duration: 11404ms [11.404secs]'
4/7/2025, 8:12:49 AM [CONVEX A(actions/index:getPricing)] [LOG] 'Cached total duration: 13079ms [13.079secs]'
4/7/2025, 8:12:39 AM [CONVEX A(actions/index:getPricingInternal)] [LOG] 'hitting a transaction response'
4/7/2025, 8:12:48 AM [CONVEX A(actions/index:getPricingInternal)] [LOG] 'Internal total duration: 11404ms [11.404secs]'
4/7/2025, 8:12:49 AM [CONVEX A(actions/index:getPricing)] [LOG] 'Cached total duration: 13079ms [13.079secs]'
This is my internal action calling the getPricingHandler , when wrapped in the action cache component, its showing the fetch call & data structuring for pricing takes about 11.4 seconds with no action cache component & calling the action directly - the getPricingHandler takes only about 3 seconds:
4/7/2025, 8:14:52 AM [CONVEX A(actions/index:getPricingHandler)] [LOG] 'Internal total duration: 3209ms [3.209secs]'
4/7/2025, 8:14:52 AM [CONVEX A(actions/index:getPricingHandler)] [LOG] 'Internal total duration: 3209ms [3.209secs]'

Did you find this page helpful?