[
https://issues.apache.org/struts/browse/TILES-87?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Antonio Petrelli updated TILES-87:
----------------------------------
Description:
There are some performance problems in attribute type evaluation:
1. The BasicTilesContainer.calculateType method is called for every attribute,
even those that have been already preprocessed. Therefore there is a (pretty
small) performance problem. Currently is a case of a null check and a String
comparison (plus a call, obiously), but in the future it could be more complex.
2. The attribute type should be evaluated only once: when the type is a
definition or a template, it is evaluated twice.
3. The attribute rendering is dependent on its type: this behaviour can be
optimized by using a "switch-case" structure.
was:
The BasicTilesContainer.calculateType method is called for every attribute,
even those that have been already preprocessed.
Therefore there is a (pretty small) performance problem. Currently is a case of
a null check and a String comparison (plus a call, obiously), but in the future
it could be more complex.
Summary: Improve attribute type evaluation performance (was:
BasicTilesContainer.calculateType is called even if an attribute does not need
preprocessing)
Updated the issue, since there are more performance problems.
> Improve attribute type evaluation performance
> ---------------------------------------------
>
> Key: TILES-87
> URL: https://issues.apache.org/struts/browse/TILES-87
> Project: Tiles
> Issue Type: Improvement
> Components: tiles-core
> Affects Versions: 2.0.0
> Environment: N/A (it's a design issue)
> Reporter: Antonio Petrelli
> Assigned To: Antonio Petrelli
> Priority: Minor
> Fix For: 2.0.4
>
>
> There are some performance problems in attribute type evaluation:
> 1. The BasicTilesContainer.calculateType method is called for every
> attribute, even those that have been already preprocessed. Therefore there is
> a (pretty small) performance problem. Currently is a case of a null check and
> a String comparison (plus a call, obiously), but in the future it could be
> more complex.
> 2. The attribute type should be evaluated only once: when the type is a
> definition or a template, it is evaluated twice.
> 3. The attribute rendering is dependent on its type: this behaviour can be
> optimized by using a "switch-case" structure.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.