You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by GitBox <gi...@apache.org> on 2022/04/20 09:45:54 UTC

[GitHub] [wicket] papegaaij commented on a diff in pull request #514: Avoid generating so many synthetic closing tags.

papegaaij commented on code in PR #514:
URL: https://github.com/apache/wicket/pull/514#discussion_r853943024


##########
wicket-core/src/main/java/org/apache/wicket/markup/ComponentTag.java:
##########
@@ -126,6 +127,8 @@ public class ComponentTag extends MarkupElement
 
 	private IAutoComponentFactory autoComponentFactory;
 
+	private static final Map<String,AppendingStringBuffer> tagMap = new ConcurrentHashMap<>();

Review Comment:
   Why not go for a much easier approach: keep the method as is and mark it deprecated in wicket 9.x and add a new method `writeSyntheticCloseTag(Response)` that writes the close tag directly to the `Response`. That would remove all the object allocations and simplify the code a lot. The solution with a cache seems overly complicated and might introduce congestion with lookups and updates.



-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@wicket.apache.org

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