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 2024/05/30 00:04:24 UTC
[Bug 68546] Performance optimization in PageContextImpl.getELContext()
https://bz.apache.org/bugzilla/show_bug.cgi?id=68546
--- Comment #5 from Dan Armstrong <su...@aoindustries.com> ---
The initial sizing to LinkedHashSet is not factoring-in the load factor (0.75
by default), thus resulting in some unnecessary re-hashing.
https://github.com/apache/tomcat/blob/b58963db1384ac286774a0d894a49fea0e1414de/java/org/apache/jasper/compiler/Generator.java#L624
Should this be either of the following?
Compute statically during JSP generation (more hiding of the implementation
details):
out.print(Integer.toString((int) Math.ceil(packages.size() / 0.75f));
Compute on the fly (more per-request overhead):
out.print("(int) Math.ceil(");
out.print(Integer.toString(packages.size()));
out.print(" / 0.75f)");
Should we open a separate issue for this?
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org