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

Warmfix/change decoder cacheing #1842

Merged
merged 1 commit into from
May 6, 2024

Conversation

thewhaleking
Copy link
Contributor

Changes the cacheing for the previously implemented get_decoder_class in #1834. While it was probably safe to do this, there are a handful of edge case scenarios in the overall configuration we may have overlooked. By changing the cached method convert_type_string, we avoid the potential edge cases that may result in serious issues down the line.

When submitting polkascan/py-scale-codec#117, I discovered these. The utilisation of the type_registry means that we should not cache this method.

By cacheing convert_type_string, we ensure we do not accidentally run into any of these issues, though it does bring our speed improvements down by roughly ⅓ 😞

Changes the cacheing for the previously implemented get_decoder_class. While it was probably safe to do this, there are a handful of edge case scenarios in the overall configuration we may have overlooked. By changing the cached method convert_type_string, we avoid the potential edge cases that may result in serious issues down the line.
@thewhaleking thewhaleking changed the base branch from master to staging May 5, 2024 14:05
@thewhaleking thewhaleking marked this pull request as ready for review May 6, 2024 17:17
@thewhaleking thewhaleking merged commit 7dd819d into staging May 6, 2024
12 checks passed
@thewhaleking thewhaleking deleted the warmfix/change-decoder-cacheing branch May 6, 2024 17:17
@gus-opentensor gus-opentensor mentioned this pull request May 17, 2024
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.

None yet

2 participants