Author | SHA1 | Message | Date |
---|---|---|---|
M. J. Fromberger |
1dca1a8f97
|
Performance improvements for the event query API (#7319)
Rework the implementation of event query parsing and execution to improve performance and reduce memory usage. Previous memory and CPU profiles of the pubsub service showed query processing as a significant hotspot. While we don't have evidence that this is visibly hurting users, fixing it is fairly easy and self-contained. Updates #6439. Typical benchmark results comparing the original implementation (PEG) with the reworked implementation (Custom): ``` TEST TIME/OP BYTES/OP ALLOCS/OP SPEEDUP MEM SAVING BenchmarkParsePEG-12 51716 ns 526832 27 BenchmarkParseCustom-12 2167 ns 4616 17 23.8x 99.1% BenchmarkMatchPEG-12 3086 ns 1097 22 BenchmarkMatchCustom-12 294.2 ns 64 3 10.5x 94.1% ``` Components: * Add a basic parsing benchmark. * Move the original query implementation to a subdirectory. * Add lexical scanner for Query expressions. * Add a parser for Query expressions. * Implement query compiler. * Add test cases based on OpenAPI examples. * Add MustCompile to replace the original MustParse, and update usage. |
3 years ago |
Sam Kleinman |
1c4950dbd2
|
state: move package to internal (#6964) | 3 years ago |
M. J. Fromberger |
6dd8984fef
|
Fix and clarify breaks from select cases. (#6781)
Update those break statements inside case clauses that are intended to reach an enclosing for loop, so that they correctly exit the loop. The candidate files for this change were located using: % staticcheck -checks SA4011 ./... | cut -d: -f-2 This change is intended to preserve the intended semantics of the code, but since the code as-written did not have its intended effect, some behaviour may change. Specifically: Some loops may have run longer than they were supposed to, prior to this change. In one case I was not able to clearly determine the intended outcome. That case has been commented but otherwise left as-written. Fixes #6780. |
3 years ago |
Aleksandr Bezobchuk |
09a6ad7b1e
|
types: Refactor EventAttribute (#6408) | 4 years ago |
Aleksandr Bezobchuk |
46e06c9732
|
state: fix block event indexing reserved key check (#6314)
copy 🍝 bug when porting similar logic from the tx indexing code.
|
4 years ago |
Aleksandr Bezobchuk |
003f394512
|
rpc: index block events to support block event queries (#6226) | 4 years ago |