aboutsummaryrefslogtreecommitdiffstats
path: root/spec
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2022-10-11 11:37:55 +0100
committerMatthew Wild <mwild1@gmail.com>2022-10-11 11:37:55 +0100
commitffa72d829be2b988074f269fc5a2177b74c77ab4 (patch)
treec318824aa4423563fa383bfb6589260ea7d81d6d /spec
parent586a0d8493acfd511a2d2319ad68628d585f94df (diff)
downloadprosody-ffa72d829be2b988074f269fc5a2177b74c77ab4.tar.gz
prosody-ffa72d829be2b988074f269fc5a2177b74c77ab4.zip
util.dbuffer: Add efficient shortcuts for discard() in certain cases
If the buffer is already empty, nothing to do. If we're throwing away the whole buffer, we can just empty it and avoid read_chunk() (which in turn may collapse()). These shortcuts are much more efficient.
Diffstat (limited to 'spec')
0 files changed, 0 insertions, 0 deletions