Too long response time from API
The problem occurred on CI -> helpy integration ( https://gitlab.syncad.com/hive/hive/-/jobs/766255 )
test_the_maximum_number_of_recurring_transfers_allowed_for_one_account
- was not completed within the allotted time.
Reason - the part of the code that checks 30_000 accounts is too slow.
for account_name in all_accounts_names:
assert replayed_node.api.wallet_bridge.find_recurrent_transfers(account_name) == []
After integrating helpy, the time of a single API call increased significantly:
helpy version:
Call time: 0.057557106018066406 s.
test_tools master-version (validate schemas ):
Call time: 0.010248422622680664 s.
The length of the test run increases proportionally to the length of a single call from 8 min to 35min.
Tested function:
def test_function():
node = tt.InitNode()
node.run()
start_time = time.time()
node.api.wallet_bridge.find_recurrent_transfers("initminer")
end_time = time.time()
execution_time = end_time - start_time
tt.logger.info(f"Call time: {execution_time}.")