mirror of
https://git.eden-emu.dev/eden-emu/eden
synced 2026-10-10 14:00:28 -04:00
b610b03d29
Signed-off-by: lizzie <lizzie@eden-emu.dev> - [x] I have read and followed the [Contribution Guidelines](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/CONTRIBUTING.md#code-contributions). - [x] I have read and followed the [AI Policy](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/docs/policies/AI.md) - [x] I have read and followed the [Coding Guidelines](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/docs/policies/Coding.md) to the best of my ability. ------------------- the idea is simple, `std::string{}` adds pressure to the memory allocator so whats the best next thing we can do? well of course use our stack its plenty, but we shouldn't be greedy either, BUFSIZ should be a fair amount of space for any would-be messages anyways the main idea behind this PR is to remove std::string{} allocations done with libfmt, that way we have 0-allocs per logging entry this should 100% remove pressure uneeded from the memory allocator we should only allocate things that are important, we can use our trusty fast stack for any string manip we need to do not await/global lock or do evil things with the memory allocator obviously stack is thread local already sooo... this is even better than having to deal with malloc()/free() in any capacity whatsoever and no clang can't heap ellide this (how would you even?) Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4273 Reviewed-by: Maufeat <sahyno1996@gmail.com> Reviewed-by: CamilleLaVey <camillelavey99@gmail.com>