This repository has been archived by the owner on Dec 15, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 77
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This was
linked to
issues
Oct 3, 2022
Hi @Solpatium! Is this PR ready for review? |
@FabijanC maybe we should include a similar test as this |
This was referenced Oct 5, 2022
ivpavici
approved these changes
Oct 5, 2022
ivpavici
reviewed
Oct 5, 2022
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.
old_test.py
is probably a leftover?
mikiw
suggested changes
Oct 5, 2022
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.
there is an empty file old_test.py, probably added by accident
Sorry, removed the leftover :) |
mikiw
approved these changes
Oct 5, 2022
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Explanation
I've found that performing a deepcopy of
ContractClass
takes a lot of time and it seems that it is not mutated, therefore deepcopies of it is are not needed.Results
I created a script that deploys a mintable ERC20 (mint function is not protected), invokes a function 50 times and performs a call 50 times.
Results before the change:
Results after the change:
Test script (requires starknet.py and openzeppelin contracts)
Usage related changes
This should only improve performance, so it shouldn't affect users.
Related to #208 and #52.
Development related changes
Updated README to inform mac users how to pass
test_postman
.Checklist:
./scripts/format.sh
./scripts/lint.sh