Santy, Michael wrote:
> I'm using XXE deployed as a web start application to edit large (>50 
> page) documents with several figures.  

This is not a *large* document. We are routinely testing XXE against 
600-page DocBook books (and yes, such books are slow to open in XXE).



> While XMLmind is very responsive 
> once a document is loaded, it takes 10s of seconds to load all 
> associated images and build the views.  While the document is loading 
> and validating, there are some messages in the message bar indicating 
> the progress.  After that, when the views are being built and images are 
> being fetched there is no indication given to the user what (if 
> anything) is happening for these 10s of seconds.  The length of time 
> taken is not necessarily the issue, but the lack of responsiveness has 
> users asking "Is it doing anything?". 
> 
> To provide a better user experience, I can think of three general 
> approaches:
> 1) Show a progress dialog with an indeterminate progress bar.  This will 
> indicate to a user that the document is still loading.
> 2) Show a progress dialog that indicates the actual progress (percentage 
> or stage) of document loading.
> 3) Progressively display the XML document like MS Word or a web 
> browser.  This would still completely load and validate the XML document 
> up front, but would show the views as they are built instead of waiting 
> for all views to be built. 
> 
> I would like to implement #1 at the bare minimum.  #2 would be 
> preferable, but the callbacks might not be in place to support this.  I 
> only mention #3 because it might be worth thinking about for XXE 4.0 and 
> realize that its not trivial.

The focus on XXE v4 is on much better support of modular documents, on 
dynamic composition of configuration (e.g. DocBook 5 + MathML), etc, not 
on ``comfort features'' like progressive display.



> Any thoughts?  Is this something that you would be interested in adding 
> to XXE? 
> 

I've tried to reproduce the unresponsiveness by opening the Developer's 
Guide, http://www.xmlmind.com/xmleditor/_distrib/doc/dev/guide.pdf, a 
96-page document containing a dozen figures several times on my old P4 
2.2Ghz Linux box/Java 1.6/*single* styled view.

* First time after a cold start, schema cache cleared: 9s.

* After that: 3s.

Note that my Linux box is pretty slow and that Java is substantially 
faster on Windows than on Linux.

So what does this mean? This means that the time is spent in
[1] Mainly JIT-compiling the code used to display the Document (this 
happens everytime XXE is started).
[2] 2s parsing and validating a large DTD (this happens once for all).

So the bottleneck is the JIT (Just In Time) compilation of byte code and 
there is now way to display a progress bar showing what's being done in 
that case.

If you cannot reproduce the above figures with your 50-page document, 
then you may have other bottlenecks. Example: SVG images, a lot of 
controls embedded in the document view, several views for the same 
document, your architecture (i.e. you start XXE through Java Web Start 
each time a user opens a document).




Reply via email to