refactor: convert EventParser to static methods and optimize caching

- Replace instance-based EventParser with static method design
  - Introduce ParserCache module for protocol config caching
  - Simplify EventProcessor to pure functional handlers
  - Optimize metrics: remove min/max tracking, keep last + avg only
  - Reduce atomic operations in hot path for better performance
This commit is contained in:
ysq
2025-10-12 17:20:50 +08:00
parent 312a675a40
commit e21f2cfd17
17 changed files with 990 additions and 811 deletions
+5
View File
@@ -1,7 +1,12 @@
pub mod account_event_parser;
pub mod common_event_parser;
pub mod global_state;
pub mod parser_cache;
pub mod traits;
pub use traits::UnifiedEvent;
pub use parser_cache::{
AccountEventParseConfig, AccountEventParserFn, GenericEventParseConfig,
InnerInstructionEventParser, InstructionEventParser, get_account_configs,
};
pub mod event_parser;