I'm able to reproduce the numbers that you are seeing when editing a document 
locally.  The issue appears to be with the latency in fetching remote images.  
XXE, even with all of my customizations, is smokin' fast.
 
Like you said, our architecture is based around web start and every document is 
loaded into a new editor.  We've also disabled the schema cache.  So I expect 
XXE to take a few seconds to load.  XXE, up to the point where the document 
view is being created, is great about reporting the status of loading.  
 
Once the document is loaded and validated, XXE starts building the view.  For 
each figure, it has to issue a request and wait for the response.  The fetching 
of images appears to be happening sequentially on a single thread.  If you 
multiply this latency by a few dozen images, the time starts to add up.  During 
this process, there is no status reported to the user.
 
I would like to show an indeterminate progress bar while the initial document 
view is being built, because this process can take several seconds.  Are there 
any events that are fired before and after the initial document view is built?
 
Cheers,
Mike

________________________________

From: Hussein Shafie [mailto:[email protected]]
Sent: Fri 12/28/2007 3:38 AM
To: Santy, Michael
Cc: xmleditor-support at xmlmind.com
Subject: Re: [XXE] XXE responsiveness during file loading



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).





-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
http://www.xmlmind.com/pipermail/xmleditor-support/attachments/20071228/05cf98fb/attachment.htm
 

Reply via email to