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
I noticed that the use of format_err! slows down the tight loop in decode_buffer quite a bit. Considering it is just a static error string it performs a lot of redundant work in a tight loop and it should be trivial to refactor out. I would make a PR myself, but I couldn't get the error types to line up with the rest of the library in time.
Hi! Thanks for these useful bindings.
I noticed that the use of
format_err!
slows down the tight loop in decode_buffer quite a bit. Considering it is just a static error string it performs a lot of redundant work in a tight loop and it should be trivial to refactor out. I would make a PR myself, but I couldn't get the error types to line up with the rest of the library in time.The line in question:
openslide-rust/src/utils.rs
Line 99 in 2993aac
A flamechart of the current situation:
After turning the
format_err!
call to a static error string (copied the whole thing into my project's codebase):The text was updated successfully, but these errors were encountered: