VictoriaMetrics/app
Aliaksandr Valialkin f4989edd96
lib/bytesutil: split Resize() into ResizeNoCopy() and ResizeWithCopy() functions
Previously bytesutil.Resize() was copying the original byte slice contents to a newly allocated slice.
This wasted CPU cycles and memory bandwidth in some places, where the original slice contents wasn't needed
after slize resizing. Switch such places to bytesutil.ResizeNoCopy().

Rename the original bytesutil.Resize() function to bytesutil.ResizeWithCopy() for the sake of improved readability.

Additionally, allocate new slice with `make()` instead of `append()`. This guarantees that the capacity of the allocated slice
exactly matches the requested size. The `append()` could return a slice with bigger capacity as an optimization for further `append()` calls.
This could result in excess memory usage when the returned byte slice was cached (for instance, in lib/blockcache).

Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/2007
2022-01-25 15:24:44 +02:00
..
victoria-metrics app/victoria-metrics: mention https://docs.victoriametrics.com/#downsampling in the description for -dedup.minScrapeInterval command-line flag 2021-12-15 13:18:04 +02:00
vmagent lib/promscrape: do not send staleness markers on graceful shutdown 2022-01-07 01:17:57 +02:00
vmalert app/vmalert: add parseDuration function in the same way as Prometheus does 2022-01-13 23:30:41 +02:00
vmauth Update README.md (#1996) 2021-12-23 12:09:59 +02:00
vmbackup docs: Correct some urls in the docs (#2081) 2022-01-19 11:55:30 +02:00
vmbackupmanager Old links replaced for newest (#2033) 2022-01-05 16:30:13 +02:00
vmctl vmctl: add option to rate limit data transfer speed 2022-01-06 12:21:42 +03:00
vmgateway all: update link to EULA from https://victoriametrics.com/assets/VM_EULA.pdf to https://victoriametrics.com/legal/eula/ 2022-01-20 22:23:27 +02:00
vminsert app/vminsert: add -maxLabelValueLen command-line flag 2021-12-06 11:40:34 +02:00
vmrestore Update README.md (#1996) 2021-12-23 12:09:59 +02:00
vmselect lib/bytesutil: split Resize() into ResizeNoCopy() and ResizeWithCopy() functions 2022-01-25 15:24:44 +02:00
vmstorage lib/{mergeset,storage}: properly limit cache sizes for indexdb 2022-01-20 18:37:17 +02:00
vmui build(deps-dev): bump @typescript-eslint/parser (#2097) 2022-01-24 13:09:46 +03:00