![]() |
|
|
|
|
Change By:
|
Tobias Mattsson
(14/Nov/14 4:40 PM)
|
|
Description:
|
The forward and include wrappers simulate servlet container dispatch operations by overriding path element getters and adding the appropriate request attributes. To properly implement these they need to adapt when a real dispatch is performed. When the servlet container performs a dispatch it doesn't add a wrapper at the front of the request chain, instead it changes the original request at the back of the chain (or inserts a wrapper inside the chain just after the original one). To detect this the Blossom wrappers probes the chain behind them to figure out if something has changed. They need to know this in order to decide whether they should override attributes and path elements.
While these calls are quick and simple they're called very frequently and need to be as fast as possible.
In BLOSSOM-130 a major improvement was made by letting the include wrapper switch itself off when a real include dispatch happens.
With this issue we should take the same approach for the forward wrapper. Other possible performance improvements should be investigated as well.
More specifically:
* ForwardRequestWrapper should stop overriding path elements when it sees a forward dispatch. This will remove the need to probe backwards for all path elements. *
When applied ForwardRequestWrapper
SpecialAttributeRequestWrapper
should
disable all other ForwardRequestWrappers already in chain
not probe backwards to test for changed attributes
since
they will have
this is
no
effect anyway
longer necessary
.
In the unusual situation where a forward is performed after an include, which is supported by containers, no include attributes should be visible
* When applied ForwardRequestWrapper should disable all
other
IncludeRequestWrappers
already
in chain to hide their attributes (bugfix).
* IncludeRequestWrapper should stop exposing attributes when it sees a forward dispatch, they must not be visible (bugfix).
In BLOSSOM-130 a major improvement was made by letting the include wrapper switch itself off when a real include dispatch happens. This works as long as a real dispatch is performed between additions of IncludeRequestWrappers. This is the case when using JSPs but not for Freemarker or Thymeleaf. We should therefor do the same thing explicitly when adding an IncludeRequestWrapper.
* When applied IncludeRequestWrapper should disable all other IncludeRequestWrappers already in chain since they will have no effect anyway.
In addition these performance enhancements should be done.
*
When applied ForwardRequestWrapper should disable all other ForwardRequestWrappers already in chain since they will have no effect anyway. *
SpecialAttributeRequestWrapper should have slots only for attributes that actually overridden. * SpecialAttributeRequestWrapper should test with a prefix on attribute name before testing its overrides. * SpecialAttributeRequestWrapper should
not probe backwards to test for changed attributes since this is no longer necessary. * SpecialAttributeRequestWrapper should
skip wrapping attribute name enumeration when disabled. * SpecialAttributeRequestWrapper should have attribute name enumeration methods inlined.
|
|
|
|
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
|
----------------------------------------------------------------
For list details, see: http://www.magnolia-cms.com/community/mailing-lists.html
Alternatively, use our forums: http://forum.magnolia-cms.com/
To unsubscribe, E-mail to: <
[email protected]>
----------------------------------------------------------------