You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2005/03/09 17:16:56 UTC
DO NOT REPLY [Bug 33933] New: -
lastModified optimization
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: apache-bugzilla@inquisitive-mind.com
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: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org