houseabsolute / Log-Dispatch

Dispatches messages to one or more outputs
https://metacpan.org/release/Log-Dispatch/
Other
12 stars 29 forks source link

Use numeric level id in generated methods and elsewhere when we have it #55

Closed autarch closed 6 years ago

autarch commented 6 years ago

Instead of passing the level name around and turning it into a number over and over, we now turn it into a number once at a public method entry point and pass that number through to private methods instead of calling public methods again.

This provides a speed increase in two ways. First, we do much less validation. Previously we would repeatedly validate the same set of args in many cases. Two, we only do the name->number lookup once.