[JIRA] Created: (LBCLASSIC-317) Improve reconfigure performance

Improve reconfigure performance ------------------------------- Key: LBCLASSIC-317 URL: http://jira.qos.ch/browse/LBCLASSIC-317 Project: logback-classic Issue Type: Improvement Components: Other Affects Versions: 1.0.0 Environment: N/A Reporter: David J. M. Karlsen Assignee: Logback dev list Looking at the code http://logback.qos.ch/xref/ch/qos/logback/classic/turbo/ReconfigureOnChangeF... it seems like the reconfigure stuff is checked at every 16th logger use. Wouldn't it be better to save the timestamp of the configuration file, and instead of number of invocations, measure the time since last reconfig, and check the delta until "now", and if it has passed, check the file timestamp again if it is newer. In a busy application 16 log statements will be called very often, so by using a period of let's say 30 seconds would save a lot of checking? -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.qos.ch/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira

[ http://jira.qos.ch/browse/LBCLASSIC-317?page=com.atlassian.jira.plugin.syste... ] David J. M. Karlsen commented on LBCLASSIC-317: ----------------------------------------------- And my assumptions about performance is from the page: http://logback.qos.ch/manual/configuration.html which says "Given that ReconfigureOnChangeFilter is invoked every time any logger is invoked, the filter is performance critical. In order to improve performance, instead of checking whether to scan or not on every logger invocation, ReconfigureOnChangeFilter is in reality "alive" only once every 16 logging operations. In short, when a configuration file changes, it will be automatically reloaded after a delay determined by the scanning period and several logger invocations. "
Improve reconfigure performance -------------------------------
Key: LBCLASSIC-317 URL: http://jira.qos.ch/browse/LBCLASSIC-317 Project: logback-classic Issue Type: Improvement Components: Other Affects Versions: 1.0.0 Environment: N/A Reporter: David J. M. Karlsen Assignee: Logback dev list
Looking at the code http://logback.qos.ch/xref/ch/qos/logback/classic/turbo/ReconfigureOnChangeF... it seems like the reconfigure stuff is checked at every 16th logger use. Wouldn't it be better to save the timestamp of the configuration file, and instead of number of invocations, measure the time since last reconfig, and check the delta until "now", and if it has passed, check the file timestamp again if it is newer. In a busy application 16 log statements will be called very often, so by using a period of let's say 30 seconds would save a lot of checking?
-- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.qos.ch/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira

[ http://jira.qos.ch/browse/LBCLASSIC-317?page=com.atlassian.jira.plugin.syste... ] Ceki Gulcu resolved LBCLASSIC-317. ---------------------------------- Resolution: Won't Fix For performance reasons, the check to see the required amount of time has elapsed is skipped 15 times out of 16. Only once in 16 times does the code check to see if sufficient time has elapsed before checking the timestamp of the config file.
Improve reconfigure performance -------------------------------
Key: LBCLASSIC-317 URL: http://jira.qos.ch/browse/LBCLASSIC-317 Project: logback-classic Issue Type: Improvement Components: Other Affects Versions: 1.0.0 Environment: N/A Reporter: David J. M. Karlsen Assignee: Logback dev list
Looking at the code http://logback.qos.ch/xref/ch/qos/logback/classic/turbo/ReconfigureOnChangeF... it seems like the reconfigure stuff is checked at every 16th logger use. Wouldn't it be better to save the timestamp of the configuration file, and instead of number of invocations, measure the time since last reconfig, and check the delta until "now", and if it has passed, check the file timestamp again if it is newer. In a busy application 16 log statements will be called very often, so by using a period of let's say 30 seconds would save a lot of checking?
-- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.qos.ch/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira
participants (2)
-
Ceki Gulcu (JIRA)
-
David J. M. Karlsen (JIRA)