IntersectMBO / plutus-apps

The Plutus application platform

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Improve performance of `initiateWallets`

koslambrou opened this issue · comments

Description

As a plutus-apps emulator user

I want an efficient version of initiateWallets

so that I waste as little time as possible when I run the emulator.

Technical details

After the first investigation of https://input-output.atlassian.net/browse/PLT-1026 (emulator performance regression following merge from next-node to main), initiateWallets takes 6% of the time of a whole plutus-use-cases run.

Here is an excerpt of the prof file that illustrates the costs of the calls inside initiateWallets:

initiateWallets      Plutus.Contract.Test.ContractModel.Internal   src/Plutus/Contract/Test/ContractModel/Internal.hs:(1566,1)-(1569,11)   368333           0    0.0    0.0     1.9    1.9
 activateWallets     Plutus.Contract.Test.ContractModel.Internal   src/Plutus/Contract/Test/ContractModel/Internal.hs:(348,1)-(353,57)     368334           0    0.0    0.0     1.9    1.9
  instanceContract   Spec.Escrow                                   test/Spec/Escrow.hs:(93,3)-(100,49)                                     368335           0    0.0    0.0     1.9    1.9