Skip to content

Optimize event parsing #178

@onnovisser

Description

@onnovisser

Viem's parseEventLogs is very inefficient and grows exponentially slower with increased ABI size and logs amount. Refactor _filteredEvents to not use parseEventLogs. Option is to filter for all ABIs in _events, so that it's only done once for all subscribers. And have a memoized toFunctionSelector and/or map from selector to ABI item to ameliorate the slowest part, which is parsing/hashing the ABI.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions