[opencms-dev] Slow getStringValue - CmsXmlContent

Fabian Huschka fhsubscriptions at componio.net
Thu Nov 11 14:27:55 CET 2010


 Try to map name, album and group to properties (within the schema
definitions)
Accessing properties is much faster than reading the whole structure
into memory.
See http://www.opencms-wiki.org/XMLContent for further details.

\Fabian

On 03.11.2010 10:22, Juan Antonio Ruiz wrote:
>
> Hi,
>
>  
>
> I have a big problem. My resources list is very large (around 1000).
> When I get a value with getStringValue, it is very much slow (around
> 15 millesec. per resource ). Total is 15 seconds. It is my code:
>
>  
>
> for (int i = 0; i < list.size(); i++) {
>
> ...
>
> CmsFile file = cmsObj.readFile(resource); 
>
> CmsXmlContent content = CmsXmlContentFactory.unmarshal(cmsObj, file); 
>
> String name = content.getStringValue(cmsObj,"Name[1]", locale); 
>
> String album = content.getStringValue(cmsObj,"Album[1]", locale);
>
> String group = content.getStringValue(cmsObj,"Group[1]", locale)
>
> ...
>
> }
>
>  
>
> Is there another way?
>
>  
>
> Thanks.
>
>
>
> _______________________________________________
> This mail is sent to you from the opencms-dev mailing list
> To change your list options, or to unsubscribe from the list, please visit
> http://lists.opencms.org/mailman/listinfo/opencms-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20101111/f69f4531/attachment.htm>


More information about the opencms-dev mailing list