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
For the mango program we recently investigated upgrading to solana 1.16.14. When we did, the program tests started taking >10x as long.
Debugging showed that every single transaction we sent with banks_client.process_transaction_with_commitment() would take 280ms in Bank::replenish_program_cache to reload the mango and token programs.
This happened because we used ProgramTestContext::warp_to_slot after every transaction. Apparently that used to preserve the cache but now resets it somehow.
We were able to work around the issue by removing warp_to_slot. (we only cared about new blockhashes for every transaction, and using the new get_new_latest_blockhash() works just as well for that)
Proposed Solution
Make warp_to_slot() retain the program cache as before
The text was updated successfully, but these errors were encountered:
Problem
For the mango program we recently investigated upgrading to solana 1.16.14. When we did, the program tests started taking >10x as long.
Debugging showed that every single transaction we sent with
banks_client.process_transaction_with_commitment()
would take 280ms inBank::replenish_program_cache
to reload the mango and token programs.This happened because we used
ProgramTestContext::warp_to_slot
after every transaction. Apparently that used to preserve the cache but now resets it somehow.We were able to work around the issue by removing
warp_to_slot
. (we only cared about new blockhashes for every transaction, and using the newget_new_latest_blockhash()
works just as well for that)Proposed Solution
Make
warp_to_slot()
retain the program cache as beforeThe text was updated successfully, but these errors were encountered: