Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve performance of fromOnChainTx #807

Open
koslambrou opened this issue Nov 8, 2022 · 0 comments
Open

Improve performance of fromOnChainTx #807

koslambrou opened this issue Nov 8, 2022 · 0 comments
Labels
performance Issues related to performance improvements Tracked Issue is tracked in our internal backlog

Comments

@koslambrou
Copy link
Contributor

Description

As a plutus-apps emulator user

I want an efficient version of fromOnChainTx

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), fromOnChainTx takes 10% 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 fromOnChainTx:

fromOnChainTx                  Plutus.ChainIndex.Tx            src/Plutus/ChainIndex/Tx.hs:(94,1)-(126,15)             359402           0    0.0    0.0     1.6    2.3
 onCardanoTx                   Ledger.Tx                       src/Ledger/Tx.hs:(306,1)-(307,42)                       359403        9280    0.0    0.0     1.6    2.3
  fromCardanoTx                Plutus.Contract.CardanoAPI      src/Plutus/Contract/CardanoAPI.hs:(38,1)-(67,13)        359404        9280    0.0    0.0     1.5    2.2
   plutusScriptsFromTxBody     Ledger.Tx.CardanoAPI.Internal   src/Ledger/Tx/CardanoAPI/Internal.hs:(372,1)-(374,68)   359430        9280    0.0    0.0     1.5    2.2
    fromLedgerScript           Ledger.Tx.CardanoAPI.Internal   src/Ledger/Tx/CardanoAPI/Internal.hs:(383,1)-(387,80)   371410        2460    0.0    0.0     1.5    2.2
     fromLedgerPlutusScript    Ledger.Tx.CardanoAPI.Internal   src/Ledger/Tx/CardanoAPI/Internal.hs:(392,1)-(404,40)   371411        2460    0.0    0.0     1.5    2.2
@koslambrou koslambrou added Tracked Issue is tracked in our internal backlog performance Issues related to performance improvements labels Nov 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
performance Issues related to performance improvements Tracked Issue is tracked in our internal backlog
Projects
None yet
Development

No branches or pull requests

1 participant