Welcome Guest, Not a member yet? Register   Sign In
can I improve the speed of log_message
#2

[eluser]Pascal Kriete[/eluser]
Disk touching calls will always be slow. You're quite correct in your observation that there is no buffer. In fact, it does quite a bit that might be considered unnecessary, like check if the file exists every time. :: Check for file, get system time, open file, lock, append, unlock, close, chmod.

Not the most elegant solution, I'll give you that.

Logging is meant for development/debugging so you could argue that it doesn't really need to be fast. And the obvious counter to something like a log-buffer is that log messages can be used to trace where an app is failing. Although I'll take an xdebug stacktrace over the CI log any day.


Messages In This Thread
can I improve the speed of log_message - by El Forum - 09-15-2008, 11:51 AM
can I improve the speed of log_message - by El Forum - 09-15-2008, 01:03 PM
can I improve the speed of log_message - by El Forum - 09-15-2008, 11:37 PM



Theme © iAndrew 2016 - Forum software by © MyBB