kamnani commented on a change in pull request #331:
URL: https://github.com/apache/tomcat/pull/331#discussion_r471563836



##########
File path: java/org/apache/jasper/compiler/NewlineReductionServletWriter.java
##########
@@ -0,0 +1,40 @@
+package org.apache.jasper.compiler;
+
+import java.io.PrintWriter;
+
+/**
+ * This class filters duplicate newlines instructions from the compiler output,
+ * and therefore from the runtime JSP. The duplicates typically happen because
+ * the compiler has multiple branches that write them, but they operate
+ * independently and don't realize that the previous output was identical.
+ *
+ * Removing these lines makes the JSP more efficient by executing fewer 
operations during runtime.
+ *
+ * @author Engebretson, John
+ * @author Kamnani, Jatin
+ *
+ */
+public class NewlineReductionServletWriter extends ServletWriter {
+    private static final String NEWLINE_WRITE_TEXT = "out.write('\\n');";

Review comment:
       SMAP Support defaults to false, and this feature has a property which 
can be default to false as well. 
   Can you provide me the links where I can write the information on this patch 
?
   This pattern is generated if the JSP files have "\n" and the extra "\n" are 
trimmed of.
    @markt-asf 
   




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to