DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://issues.apache.org/bugzilla/show_bug.cgi?id=33933>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND· INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=33933 Summary: lastModified optimization Product: Tomcat 5 Version: 5.5.7 Platform: All OS/Version: All Status: NEW Severity: enhancement Priority: P5 Component: Servlet & JSP API AssignedTo: tomcat-dev@jakarta.apache.org ReportedBy: [EMAIL PROTECTED] A very trivial change to the rounding down to the nearest second. The following is an order of magnitude faster, about 20x from a quick test. --- HttpServlet.java- Wed Mar 9 16:06:30 2005 +++ HttpServlet.java Wed Mar 9 16:10:13 2005 @@ -689,7 +689,7 @@ doGet(req, resp); } else { long ifModifiedSince = req.getDateHeader(HEADER_IFMODSINCE); - if (ifModifiedSince < (lastModified / 1000 * 1000)) { + if (ifModifiedSince < (lastModified - lastModified & 999)) { // If the servlet mod time is later, call doGet() // Round down to the nearest second for a proper compare // A ifModifiedSince of -1 will always be less -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]