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

Remove Show for PlutusDebug and disable traceEvent on PlutusScriptResult #2772

Merged
merged 1 commit into from
May 9, 2022

Conversation

lehins
Copy link
Collaborator

@lehins lehins commented May 6, 2022

@TimSheard and I discovered that it is really expensive to traceEvent that involves PlutusDebug, because showing that type is way too inefficient (naturally due to the String type and the size of the type).

This PR simply disables showing the ScriptResult in the event log tracing. If this is an unacceptable solution we need discuss a better one. However, adding the huge debug trace for every script even if it is only for profiling is unacceptable, because it affects our ability to argue about performance of running a script, since showing the PlutusDebug will dominate the overhead.

Also this PR intentionally removes the Show instance, to prevent future temptation of relying on it.

@lehins lehins force-pushed the lehins/disable-plutus-debug-tracing branch from 06f377e to 18aa400 Compare May 6, 2022 23:24
Copy link
Contributor

@JaredCorduan JaredCorduan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fantastic catch @lehins ! I don't think anyone depends on showing the script result in the trace, I think it is just used for gathering statistics.

I'd love to know how we missed this in our earlier profiles (using db-analyze). 🤔

@lehins lehins merged commit 34d2bd2 into master May 9, 2022
@iohk-bors iohk-bors bot deleted the lehins/disable-plutus-debug-tracing branch May 9, 2022 15:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants