-
Notifications
You must be signed in to change notification settings - Fork 431
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
Extract non-generic part of push_topic
to reduce code size
#1026
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1026 +/- ##
===========================================
- Coverage 78.87% 62.57% -16.31%
===========================================
Files 246 246
Lines 9260 9258 -2
===========================================
- Hits 7304 5793 -1511
- Misses 1956 3465 +1509
Continue to review full report at Codecov.
|
🦑 📈 ink! Example Contracts ‒ Size Change Report 📉 🦑These are the results of building the
Link to the run | Last update: Fri Nov 19 14:32:57 CET 2021 |
Does this still result in the same gains after moving to the inner function approach? |
It did for |
Not sure how to get the bot to repost the example contract sizes, this might be the run: https://gitlab.parity.io/parity/ink-waterfall/-/jobs/1232706. Anyway testing locally revealed the same improvement. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
…#1026) * Extract non-generic part of `push_topic` * Move to inner fn
Marginal total of
0.3KB
(10.3
down from10.6
) on ERC20.However it appears to reduce the amount of increase of each additional type of topic (see example below), since the extracted non generic part will not be duplicated each time. e.g. commenting out the
Option<AccountId>
topicsmaster
10.2
->10.6
=+0.4
this PR
10.1
->10.3
=+0.2
Rel #990