-
Notifications
You must be signed in to change notification settings - Fork 137
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
Cache results of entitlement type conversion #3232
Conversation
Cadence Benchstat comparisonThis branch with compared with the base branch onflow:master commit 5131b0a Collapsed results for better readability
|
Nice! Good idea to cache the migration result. Maybe we can lift this from a per-account cache, to a global cache? (i.e. cache for all accounts, in the flow-go migration code) 🤔 |
Yeah I think I can add a function here to create a migration with a pre-existing cache? And the flow-go code can pass that in. |
@SupunS @turbolent now that #3248 is merged, this should be unblocked. Could you take another look? |
@dsainati1 yeah, we should be able to look into this again. Could you please update the branch? |
…lement-type-migration-cache
Not 100% sure, but given that the entitlements migration runs after the static type migration, I guess it should be safe to use the type ID as the cache key? Alternatively we could maybe also use the encoding (CBOR bytes) of the static type as the key. |
Yeah, this assumption was why the dependency between this and the optional typeID PR existed. |
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.
👍
Optimize entitlements migration by caching results of
ConvertToEntitledType
.Depends on #3272
master
branchFiles changed
in the Github PR explorer