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

Compile time regression with PAB/TraceEmulator Effects. #3224

Closed
t1lde opened this issue May 19, 2021 · 6 comments
Closed

Compile time regression with PAB/TraceEmulator Effects. #3224

t1lde opened this issue May 19, 2021 · 6 comments
Labels

Comments

@t1lde
Copy link

t1lde commented May 19, 2021

Area

[] Plutus Foundation Related to the GHC plugin, Haskell-to-Plutus compiler, on-chain code
[x] Plutus Application Framework Related to the Plutus application backend (PAB), emulator, Plutus libraries
[] Marlowe Related to Marlowe
[] Other Any other topic (Playgrounds, etc.)

Summary

We have a moderately sized project currently (~40 modules) and compile times seem to have gotten longer (~300s, not including any dependencies) as we have added more endpoints to the Contract monad effects row.

I think this is probably related to the previous regressions from the row-types library, but not from our end - inlining the results of the .\/ type family doesn't seem to help.

It seems to be taking most of the time compiling the tests modules (6 total), which make use of Plutus.Contract.Test and TraceEmulator in particular. A Main module which uses Simulator effects also seems to compile slowly.

This could be due to something that has been fixed in updates of dependency libraries, but we haven't been updating the dependencies in stack.yaml as frequently as the plutus version (the plutus sample stack.yaml doesn't seem to have been updated often, either).
Apologies if this has already been fixed since the plutus commit we're currently working with, I didn't see anything that looked as if it might be a fix. And it would take some code changes to update to the latest master commit.

Info

@t1lde t1lde added the bug label May 19, 2021
@luigy
Copy link
Contributor

luigy commented May 21, 2021

I wonder if this is something that would benefit from target/row-types#77 ? curious how it goes if you end up trying an override locally

@t1lde
Copy link
Author

t1lde commented May 24, 2021

I'll keep an eye on it if our compile time gets any worse, for now I've been able to improve things some with more aggressive use -O0 (tricky with the plugin in the mix)

@ghost
Copy link

ghost commented May 25, 2021

Previous issues with row-types led to humongous memory usage and compilation errors if memory was not enough. There were fixes for some operators from row-types but the reason this time can be a different.

I think it might be useful to play with memory limitations with GHC flags ghc-options: -W +RTS -M1G -RTS changing memory limit. It's hard to tell where's the problem without a snippet or a reproducible case.

@t1lde
Copy link
Author

t1lde commented May 26, 2021

I think it actually might be different from the memory-usage issue with row types.
Have also been noticing when compiling that plutus-use-cases is compiling slower.

@luigy
Copy link
Contributor

luigy commented Jun 17, 2021

@t1lde you should give a more recent master a try that includes #3342 . I'm seeing significant shorter reload times in the repl in my tests. Haven't measured building yet

@ghost
Copy link

ghost commented Aug 27, 2021

Closing this issue as it should be fixed.

If it's not, please re-open.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants