Revision e80dd00894128e0bcc0ba6143fca9a35e7b4279e authored by mmsqe on 13 September 2022, 08:42:14 UTC, committed by GitHub on 13 September 2022, 08:42:14 UTC
* 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%
```
1 parent 93ead3d
History
File Mode Size
.github
DOCKER
abci
blocksync
cmd
config
consensus
crypto
docs
evidence
internal
libs
light
mempool
networks
node
p2p
privval
proto
proxy
rpc
scripts
spec
state
statesync
store
test
third_party
tools
types
version
.clang-format -rw-r--r-- 241 bytes
.dockerignore -rw-r--r-- 63 bytes
.editorconfig -rw-r--r-- 280 bytes
.gitignore -rw-r--r-- 786 bytes
.golangci.yml -rw-r--r-- 716 bytes
.goreleaser.yml -rw-r--r-- 638 bytes
.markdownlint.yml -rw-r--r-- 346 bytes
.markdownlintignore -rw-r--r-- 89 bytes
.md-link-check.json -rw-r--r-- 122 bytes
CHANGELOG.md -rw-r--r-- 197.9 KB
CHANGELOG_PENDING.md -rw-r--r-- 3.1 KB
CODE_OF_CONDUCT.md -rw-r--r-- 5.1 KB
CONTRIBUTING.md -rw-r--r-- 15.9 KB
LICENSE -rw-r--r-- 11.1 KB
Makefile -rw-r--r-- 13.8 KB
PHILOSOPHY.md -rw-r--r-- 7.5 KB
README.md -rw-r--r-- 7.4 KB
RELEASES.md -rw-r--r-- 18.7 KB
SECURITY.md -rw-r--r-- 7.9 KB
STYLE_GUIDE.md -rw-r--r-- 7.6 KB
UPGRADING.md -rw-r--r-- 30.7 KB
Vagrantfile -rw-r--r-- 2.1 KB
appveyor.yml -rw-r--r-- 261 bytes
buf.gen.yaml -rw-r--r-- 278 bytes
buf.work.yaml -rw-r--r-- 35 bytes
buf.yaml -rw-r--r-- 151 bytes
codecov.yml -rw-r--r-- 407 bytes
docker-compose.yml -rw-r--r-- 1.3 KB
dredd.yml -rw-r--r-- 700 bytes
go.mod -rw-r--r-- 13.6 KB
go.sum -rw-r--r-- 170.4 KB
release_notes.md -rw-r--r-- 400 bytes
tests.mk -rw-r--r-- 1.5 KB

README.md

back to top