Skip to content

Cache get_decoder_class #1833

Closed
Closed
@thewhaleking

Description

@thewhaleking

Currently, a large portion of time (29000+ calls for get_delegates) for RPC calls is taken up by decoding. Profiling this shows that the vast majority of this decoding time is actually caused by calls to the scalecodec.base.RuntimeConfiguration.get_decoder_class method.

Because of the fairly limited number of decoder classes, we should be able to cache this with functools.cache to see large speed improvements.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions