-
New Feature
-
Resolution: Fixed
-
Major
-
2.1 Final
-
None
-
all
-
-
Empty show more show less
The custom tags IfEmpty and IfNotEmpty are very slow when evaluating binary data. Because these tags load the binary data into memory they also consum a lot of resources. This effect is severed with increasing sizes of binary data.
The attached custom tag java classes check only for existence of nodes and therefore are much faster and less resource hungry.
The taglib definition snippets are:
<tag>
<name>ifNotExisting</name>
<tag-class>info.magnolia.cms.taglibs.IfNotExisting</tag-class>
<body-content>JSP</body-content>
<description>
evaluates the body only if a container and / or the corresponding atom does not exist
</description>
<attribute>
<name>nodeDataName</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
<description></description>
</attribute>
<attribute>
<name>atomName</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
<description></description>
</attribute>
<attribute>
<name>contentNodeName</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
<description></description>
</attribute>
<attribute>
<name>contentNodeCollectionName</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
<description></description>
</attribute>
<attribute>
<name>actpage</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
<type>boolean</type>
<description></description>
</attribute>
</tag>
<tag>
<name>ifExisting</name>
<tag-class>info.magnolia.cms.taglibs.IfExisting</tag-class>
<body-content>JSP</body-content>
<description>this is exactly the opposite of the ifNotExisting Tag</description>
<attribute>
<name>nodeDataName</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
<description></description>
</attribute>
<attribute>
<name>atomName</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
<description></description>
</attribute>
<attribute>
<name>contentNodeName</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
<description></description>
</attribute>
<attribute>
<name>contentNodeCollectionName</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
<description></description>
</attribute>
<attribute>
<name>actpage</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
<type>boolean</type>
<description></description>
</attribute>
</tag>