You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After handling #2706 locally, 44% of my allocations locally are from path building when using the MonitorUpdatingPersister! That's obviously nuts, and luckily we can cut this down with careful buffer management:
MonitorName has an obvious maximum size, so should be a fixed length buffer with a length field.
Similarly, we realloc a ton when building paths with the PathBuf abstraction. Because they're super short, we should be storing them on the stack in constant-size buffers, though sadly its a bit more involved because on Unix its all bytes and on Windows its all u16s. IMO we should just use with_capacity on Windows, but on Unix we should use fixed-length buffers and make it a path with https://doc.rust-lang.org/std/os/unix/ffi/trait.OsStrExt.html#tymethod.from_bytes (internet claims max path len is only 4096 bytes, so this should be easy).
The text was updated successfully, but these errors were encountered:
After handling #2706 locally, 44% of my allocations locally are from path building when using the MonitorUpdatingPersister! That's obviously nuts, and luckily we can cut this down with careful buffer management:
MonitorName
has an obvious maximum size, so should be a fixed length buffer with a length field.realloc
a ton when building paths with thePathBuf
abstraction. Because they're super short, we should be storing them on the stack in constant-size buffers, though sadly its a bit more involved because on Unix its all bytes and on Windows its all u16s. IMO we should just usewith_capacity
on Windows, but on Unix we should use fixed-length buffers and make it a path with https://doc.rust-lang.org/std/os/unix/ffi/trait.OsStrExt.html#tymethod.from_bytes (internet claims max path len is only 4096 bytes, so this should be easy).The text was updated successfully, but these errors were encountered: