Author | SHA1 | Message | Date |
---|---|---|---|
Sam Kleinman |
a62ac27047
|
service: remove exported logger from base implemenation (#7381) | 3 years ago |
Sam Kleinman |
a823d167bc
|
service: cleanup base implementation and some caller implementations (#7301) | 3 years ago |
Sam Kleinman |
4af2dbd03b
|
eventbus: plumb contexts (#7337)
* eventbus: plumb contexts * fix lint |
3 years ago |
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 |
6ab62fe7b6
|
service: remove stop method and use contexts (#7292) | 3 years ago |
Sam Kleinman |
d7606777cf
|
libs/service: pass logger explicitly (#7288)
This is a very small change, but removes a method from the `service.Service` interface (a win!) and forces callers to explicitly pass loggers in to objects during construction rather than (later) injecting them. There's not a real need for this kind of lazy construction of loggers, and I think a decent potential for confusion for mutable loggers. The main concern I have is that this changes the constructor API for ABCI clients. I think this is fine, and I suspect that as we plumb contexts through, and make changes to the RPC services there'll be a number of similar sorts of changes to various (quasi) public interfaces, which I think we should welcome. |
3 years ago |
M. J. Fromberger |
54d7030510
|
pubsub: Move indexing out of the primary subscription path (#7231)
This is part of the work described by #7156. Remove "unbuffered subscriptions" from the pubsub service. Replace them with a dedicated blocking "observer" mechanism. Use the observer mechanism for indexing. Add a SubscribeWithArgs method and deprecate the old Subscribe method. Remove SubscribeUnbuffered entirely (breaking). Rework the Subscription interface to eliminate exposed channels. Subscriptions now use a context to manage lifecycle notifications. Internalize the eventbus package. |
3 years ago |