Andy Black wrote:
> We've just learned that a large (540KB) XML file for one of our custom 
> configurations loads very slowly in version 4.1.0.  In version 3.8.1 it 
> takes about 12 seconds, but in 4.1.0 it takes about 5 minutes and 20 
> seconds.  We are using the Personal Edition in both cases.
> 
> Is this a known problem?  (I tried looking for something on this in the 
> archives for this list, but did not find anything.)
> 
> 12 seconds to load is fine, but over 5 minutes is a bit daunting.  Are 
> there plans to address this?

I'm almost sure you are comparing XXE v3.8.1 with custom configuration A 
  to XXE v4.1 with custom configuration A' (which is enhanced custom 
configuration A).

Your CSS style sheet contains many rules like this one:
---
iword item
{
   display:block;
   color: concatenate(xpath("id(@lang)/@color"));
   font-family: concatenate("'",xpath("id(@lang)/@font-family"),"'");
   font-size: concatenate(xpath("id(@lang)/@font-size"));
   font-style: concatenate(xpath("id(@lang)/@font-style"));
   font-weight: concatenate(xpath("id(@lang)/@font-weight"));
}
---

The performance problem comes from the "id()" XPath function. There is 
simply no way to make this kind of rule fast in the context on an XML 
editor (while this is not a problem for a browser or for an XSLT processor).

This has always been the case, even in XXE v3. By the way, this part of 
the code has not changed at all between v3 and v4.

I did a very simple optimization which divided by 5 the load time of 
your document. Before the optimization it took 11mn30s (on my old, slow, 
desktop) to load your document. After this optimization, it took 2mn40s, 
which is still totally unacceptable.

I've also implemented another strategy to handle id() in the context of 
CSS rules, and found it to be slower than current strategy (once 
optimized). So I gave up this alternative strategy.

I'm really sorry but there is nothing more I can do for your problem. I 
can just recommend to keep the number of CSS rules making use of id() to 
the bare minimum.



---
PS: XLingPap.dtd references  XLingPapPublisherStyleSheet.dtd, which does 
not exist. Your DTD module is called "XLingPapPublisherStylesheet.dtd" 
(notice the capitalization). Of course, this is not a problem on 
Windows, where the file system is case-insensitive.


Reply via email to