]> git.ipfire.org Git - thirdparty/pdns.git/commit
dnsdist: Save 60 kB on the Lua FFI wrappers
authorRemi Gacogne <remi.gacogne@powerdns.com>
Mon, 24 Jan 2022 08:59:05 +0000 (09:59 +0100)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Thu, 7 Apr 2022 14:09:52 +0000 (16:09 +0200)
commit59bfad51e8083cabd396930906664fd23cc0c06e
tree71b05f47d5ada6f1777a88509e30ca6eb994638d
parente04bf91233618140741198e66efcf56a318c5871
dnsdist: Save 60 kB on the Lua FFI wrappers

Moving the definition of the Lua FFI wrappers outside a function avoids
a copy to be constructed on the first usage of that function. Using an
array of chars instead of a string prevents a second copy from occurring
at startup.
pdns/dnsdistdist/dnsdist-lua-ffi.cc
pdns/dnsdistdist/dnsdist-lua-ffi.hh