[opencms-dev] Workplace Performance
Shaun Kelly
shaun.kelly at spike.com.au
Thu Aug 17 09:20:16 CEST 2000
Hi,
I have found a performance problem with the OpenCms WorkPlace. Every time
the class CmsXmlWpTemplateFile is created, it creates a new instance of
CmsXmlLanguageFile. On creation CmsXmlLanguageFile, parses the appropriate
language file for the current user. Parsing the language file is a slow
process, it takes about 1.5 seconds. An instance of CmsXmlWpTemplateFile is
created for each request to the CMS, even if the request is for an image.
This drastically reduces the performance of the CMS. A temporary fixed is
shown in the code below. This code will fix the language used by WorkPlace
to the default language (German). If you wish to use English, you will need
to change the default language to English.
Regards Shaun
class CmsXmlWpTemplateFile
static private CmsXmlLanguageFile m_languageFile = null;
public void init(CmsObject cms, CmsFile file) throws CmsException {
if(m_languageFile == null)
{
m_languageFile = new CmsXmlLanguageFile(cms);
}
super.init(cms, file);
}
public void init(CmsObject cms, CmsFile file) throws CmsException {
if(m_languageFile == null)
{
m_languageFile = new CmsXmlLanguageFile(cms);
}
super.init(cms, file);
}
Shaun Kelly
S P I K E
Email: shaun.kelly at spike.com.au
Ph: 61 2 8584 8584
Fax: 61 2 8584 8500
> L O S A N G E L E S T O K Y O S Y D N E Y M E L B O U R N E A U C K L
> AN D
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20000817/08869584/attachment.htm>
More information about the opencms-dev
mailing list