ggeorgovassilis / fauxjsp Goto Github PK
View Code? Open in Web Editor NEWJSP implementation with fast page reloads that uses an interpreter rather than a compiler
License: GNU General Public License v3.0
JSP implementation with fast page reloads that uses an interpreter rather than a compiler
License: GNU General Public License v3.0
the <%@include %> instruction passes garbled "classpath:" paths to the resource resolver
Profiling showed that Intepreter.eval in BeanShellScriptletRenderImpl takes up 7,5 sec of 11 sec self-time.
Given:
X=123
<prefix:tagfile X="456"/>
Expected result: "tagfile" reads "456" as the value of X
Actual result: "tagfile" reads "123" as the value of X
Interpreter instances stored in BeanshellScriptletRendererImpl.cachedInterpreters
are assigned variables which are not cleared after invocation creating a memory leak.
Impact: one BeanshellScriptletRendererImpl
instance is created per renderer and thrown away with that renderer after the page is rendered, which means that the memory leak is temporary and lasts for the duration of a page rendering but may be an issue with large, temporary objects. Another issue is that the scriptlet context will contain now variables from earlier invocations.
Mitigation: profiling showed that clearing variables with unset(varname)
has a considerable performance impact.
Runtime profiling revealed that beanshell accesses the container class loader multiple times for every invocation, being the highest self-time (3x the next highest self-time).
TestPerformance.testJspRenderer records dropping renderer performance over last month's commits. The test uses a rather simple, nested, JSP with tagsfiles which renders a large tree of nodes. It used to be able to render a few dozen pages/sec, now it's down to 2 pages/sec.
I'm recording some of the findings and why, for now, I won't fix this issue. In short: fixing the findings would require caching, which introduces state, which is an opportunity for bugs. The stated mission of fauxjsp is to be as simple and robust as possible.
Text (e.g. <node>text</node>
) and attribute values (e..g <a attribute="value">
) are evaluated by EL with every rendering invocation; it is probably faster to determine during parsing which values contain EL and submit only those for evaluation.
Profiling showed a moderate performance impact of TimeZone.getDefault()
in JspRenderImpl.renderNode()
Hi. Do you plan to certify this implementation? I can help you setting up the TCK if you would like.
However, the current specification of JSP (Jakarta Server Pages) did a rename from javax to jakarta. So it would require renaming the namespace from javax to jakarta.
https://www.agilejava.eu/2021/02/05/compatible-implementations/
https://jakarta.ee/specifications/pages/3.0/
Profiling showed that PrintStream initialisation in BeanshellScriptletRendererImpl is expensive (4 seconds self-time)
This feature deviates from JSP.
Beanshell offers a strict interpreter mode which conforms to Java-only syntax.
Exceptions in beanshell are printed as a generic jsp error but their root cause is omitted.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.