skywalking-java/oap-server
kezhenxu94 84a7fe30c8
Perf: cache regex pattern and result, optimize string concatenation (#7199)
The possible metrics names are relatively fixed in an OAP run, we previously always escape the metrics names, building a new regex Pattern from scratch, which is cpu-consuming.

In this patch, I cache the escaped metrics names, and if it missed, use a pre-compiled regex Pattern to escape the metrics name.

This patch also replace string concatenation `+` with `StringBuilder` in generated classes, which won't get optimized by Java compiler

This may reduce 1~1.5 vCPU under 20K RPS environment.
2021-06-29 17:46:42 +08:00
..
analyzer Perf: cache regex pattern and result, optimize string concatenation (#7199) 2021-06-29 17:46:42 +08:00
exporter Initialize 8.7.0 iteration (#7078) 2021-06-08 07:41:09 +08:00
oal-grammar revert #7091 (#7189) 2021-06-28 21:05:28 +08:00
oal-rt Perf: cache regex pattern and result, optimize string concatenation (#7199) 2021-06-29 17:46:42 +08:00
server-alarm-plugin Initialize 8.7.0 iteration (#7078) 2021-06-08 07:41:09 +08:00
server-bootstrap Support prepare and save metrics concurrency (#7153) 2021-06-29 14:34:29 +08:00
server-cluster-plugin Extract dependency management to a bom (#7136) 2021-06-20 20:57:26 +08:00
server-configuration Extract dependency management to a bom (#7136) 2021-06-20 20:57:26 +08:00
server-core Support prepare and save metrics concurrency (#7153) 2021-06-29 14:34:29 +08:00
server-fetcher-plugin revert #7091 (#7189) 2021-06-28 21:05:28 +08:00
server-health-checker Initialize 8.7.0 iteration (#7078) 2021-06-08 07:41:09 +08:00
server-library Extract dependency management to a bom (#7136) 2021-06-20 20:57:26 +08:00
server-query-plugin Initialize 8.7.0 iteration (#7078) 2021-06-08 07:41:09 +08:00
server-receiver-plugin perf: trim useless metadata fields in ALS to improve performance (#7191) 2021-06-28 22:18:14 +08:00
server-starter Initialize 8.7.0 iteration (#7078) 2021-06-08 07:41:09 +08:00
server-starter-es7 Extract dependency management to a bom (#7136) 2021-06-20 20:57:26 +08:00
server-storage-plugin OAL supports generating metrics from events (#7134) 2021-06-19 20:20:37 +08:00
server-telemetry Initialize 8.7.0 iteration (#7078) 2021-06-08 07:41:09 +08:00
server-testing Initialize 8.7.0 iteration (#7078) 2021-06-08 07:41:09 +08:00
server-tools OAL supports generating metrics from events (#7134) 2021-06-19 20:20:37 +08:00
pom.xml Extract dependency management to a bom (#7136) 2021-06-20 20:57:26 +08:00