When working on issue #437 I noticed that stumpless_get_facility_enum_from_bufferand stumpless_get_severity_enum_from_buffer create a copy of the parameter and then convert that copy to uppercase to compare.
As a solution I suggest implementing the strcasecomp function which performs a case-insensitive compare. And use this function to directly compare the parameter instead of its copy thus further reducing allocations and improving speed.
When working on issue #437 I noticed that
stumpless_get_facility_enum_from_buffer
andstumpless_get_severity_enum_from_buffer
create a copy of the parameter and then convert that copy to uppercase to compare.As a solution I suggest implementing the
strcasecomp
function which performs a case-insensitive compare. And use this function to directly compare the parameter instead of its copy thus further reducing allocations and improving speed.Maybe I am forgetting something, let me know!