Thomas DeWeese wrote:

<snip/>


As I said it is unclear why the load cache isn't cleared between loads of toplevel documents although this is the only thing I can think of that might explain a large performace difference.

Thanks for this.

Here is some annotated logging output from my applet, the difference in timings becomes a bit more obvious.

=== MANUAL METHOD ===

15:27:30:664-DEBUG-MapController: opening connection to server
--> read document from server using factory.createSVGDocument(uri, inputstream)
15:27:32:737-DEBUG-MapController: connection closed
--> at this moment we have a parsed SVGDocument instance
15:27:32:737-DEBUG-Map: setting document
--> canvas.setDocument(svgdoc)
15:27:38:415-DEBUG-Map: done setting document
--> setDocument() finishes after 5 seconds !
15:27:38:455-DEBUG-Map$CanvasMonitor: gvt build started
15:27:41:800-DEBUG-Map$CanvasMonitor: gvt build completed
15:27:41:840-DEBUG-Map$LoadEventMonitor: load event dispatch started
15:27:41:910-DEBUG-Map$LoadEventMonitor: load event dispatch completed
15:27:41:960-DEBUG-Map$CanvasMonitor: gvtrendering prepare
15:27:42:521-DEBUG-Map$CanvasMonitor: gvt rendering started
15:27:43:021-DEBUG-Map$CanvasMonitor: gvt rendering completed
15:27:43:071-DEBUG-Map$CanvasMonitor: update manager started
--> another 5 seconds for the rendering


TOTAL: 13 seconds

=== SETURI METHOD ===

15:38:36:617-DEBUG-Map: setting document
--> this now does a canvas.setURI()
15:38:36:707-DEBUG-Map: done setting document
15:38:36:747-DEBUG-Map$CanvasMonitor: document loading started
15:38:38:700-DEBUG-Map$CanvasMonitor: document loading completed
15:38:38:730-DEBUG-Map$CanvasMonitor: gvt build started
15:38:39:120-DEBUG-Map$CanvasMonitor: gvt build completed
15:38:39:161-DEBUG-Map$LoadEventMonitor: load event dispatch started
15:38:39:221-DEBUG-Map$LoadEventMonitor: load event dispatch completed
15:38:39:241-DEBUG-Map$CanvasMonitor: gvtrendering prepare
15:38:39:952-DEBUG-Map$CanvasMonitor: gvt rendering started
15:38:40:442-DEBUG-Map$CanvasMonitor: gvt rendering completed
15:38:40:452-DEBUG-Map$CanvasMonitor: update manager started

TOTAL: 4 seconds


Observations:
- The GVT build takes 3.3 seconds in the first case, but only 0.5 in the second. You said this behaviour was expected.
- Why does the setDocument call take about 5 seconds in the first case?
- Why are there no document loading events being emitted in the first case?



Hope this gives some new insights as to why it is slower to use the first method.



Regards Jorg Heymans


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to