Just my 2c without looking into the code, but I assume speed
improvements already can be gained by replacing the pattern matches, if
possible with a direct ll comparison.
Regexps often are heavier than simple parsing or string operations.
Another thing might be that we add some caching mechanism on this level
which caches per request if possible. But I have not looked into the
code, so I am making wild assumptions here.
I assume also that some speed still can be gained in this area by better
utilization of the improved tree walking api jsf2 provides.
Werner
Am 20.10.10 15:54, schrieb Martin Koci:
Hi,
a issue to consider in
org.apache.myfaces.view.facelets.tag.TagAttributeImpl:
Methods
TagAttributeImpl.getMethodExpression and
TagAttributeImpl.getValueExpression use
CompositeComponentELUtils.isCompositeComponentXYZ methods to detect if
current #{} contains cc expression. But consider following: if user
migrates from facelets 1.2 to 2.0, this new cc detection slows down
build view process. In one my test case VDL.buildView calls
CompositeComponentELUtils.isCompositeComponentXYZ approx 3000 times per
build view with no match. isCompositeComponentXYZ is not cheap method
because it uses Pattern.matches().
Are there possibilities to avoid this? For example is possible have some
kind of "isProcessingCompositeComponent" method and skip
Pattern.matches() if false? We are in VDL.buildView here and no
components are available yet, no use of methods like
UIComponent.isCompositeComponent(UIComponent) is possible.
Any ideas?
Regards,
Kočičák