You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-users@xmlgraphics.apache.org by snapper <jc...@snapdragonmedical.com> on 2007/01/09 23:09:48 UTC

JS keyword class search over HTTP

How can I improve SVG performance for time wasted searching over HTTP for JS
keyword classes?

A network trace reveals that our applet using Batik spends too much time
doing HTTP requests for classes that are based on script keywords.

It looks like it does 2 (or is that just 1) http requests for each time it
wants to find a keyword class,

network: Connecting https://.../applet/java/lang/document.class with
proxy=DIRECT
network: Connecting https://.../applet/java/lang/document.class with cookie
"cod=1; JSESSIONID=RaPm2ZQFODxS3TnPD4qnqme5D64xwmOCeomp1fr6+U8="

Then it requests for the same class using another path, and then it uses
another path, etc, until it apparently finds it.

The list of requests includes these JS keyword classes and paths:

...applet/java/lang/document.class
...applet/org/w3c/dom/document.class
...applet/org/w3c/dom/css/document.class
...applet/org/w3c/dom/events/document.class
...applet/org/w3c/dom/smil/document.class
...applet/org/w3c/dom/stylesheets/document.class
...applet/org/w3c/dom/svg/document.class
...applet/org/w3c/dom/views/document.class
...applet/java/lang/window.class
...applet/org/w3c/dom/window.class
...applet/org/w3c/dom/css/window.class
...applet/org/w3c/dom/events/window.class
...applet/org/w3c/dom/smil/window.class
...applet/org/w3c/dom/stylesheets/window.class
...applet/org/w3c/dom/svg/window.class
...applet/org/w3c/dom/views/window.class
...applet/java/lang/event.class
...applet/org/w3c/dom/event.class
...applet/org/w3c/dom/css/event.class
...applet/org/w3c/dom/events/event.class
...applet/org/w3c/dom/smil/event.class
...applet/org/w3c/dom/stylesheets/event.class
...applet/org/w3c/dom/svg/event.class
...applet/org/w3c/dom/views/event.class
...applet/java/lang/Node.class
...applet/org/w3c/dom/Function.class
...applet/org/w3c/dom/Function/prototype.class
...applet/org/w3c/dom/css/Node.class
...applet/org/w3c/dom/events/Node.class
...applet/org/w3c/dom/smil/Node.class
...applet/org/w3c/dom/stylesheets/Node.class
...applet/org/w3c/dom/svg/Node.class
...applet/java/lang/a.class
...applet/org/w3c/dom/a.class
...applet/org/w3c/dom/css/a.class
...applet/org/w3c/dom/events/a.class
...applet/org/w3c/dom/smil/a.class
...applet/org/w3c/dom/stylesheets/a.class
...applet/org/w3c/dom/svg/a.class
...applet/org/w3c/dom/views/a.class

It also happens for all global JS var's. So I eliminated all globals
possible.

It seems to be a waste of time and bandwith every time you start a script in
Batik using an applet.
Is there a way to provide the applet with some correct context or optimal
ordering so it does not do all these requests?
















...applet/org/w3c/dom/events/evt.class

I found this related post from 2 years ago... it appears nobody answered it.
http://mail-archives.apache.org/mod_mbox/xmlgraphics-batik-users/200501.mbox/%3C41E65C08.1060200@freemail.hu%3E
-- 
View this message in context: http://www.nabble.com/JS-keyword-class-search-over-HTTP-tf2949182.html#a8247686
Sent from the Batik - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org


Re: JS keyword class search over HTTP

Posted by Pieter Jansen <pj...@gmail.com>.
On 1/12/07, thomas.deweese@kodak.com <th...@kodak.com> wrote:
>
> Hi JClango,
>
> snapper <jc...@snapdragonmedical.com> wrote on 01/09/2007 05:09:48 PM:
>
>  > A network trace reveals that our applet using Batik spends too much time
>  > doing HTTP requests for classes that are based on script keywords.
>
>    This isn't really Batik, it is Rhino the Javascript engine
> Batik uses to run JavaScript.  To be honest I know only a small
> amount about Rhino.  It would be great if you would track this
> down with the Rhino Developers and get back to us with potential
> "high level" solutions.

Just a suggestion: did you create a JAR file of your applet? It might
narrow the context to that jar only.

Pieter
--
http://pitr.net

---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org


Re: JS keyword class search over HTTP

Posted by th...@kodak.com.
Hi JClango,

snapper <jc...@snapdragonmedical.com> wrote on 01/09/2007 05:09:48 PM:

> A network trace reveals that our applet using Batik spends too much time
> doing HTTP requests for classes that are based on script keywords.

   This isn't really Batik, it is Rhino the Javascript engine
Batik uses to run JavaScript.  To be honest I know only a small
amount about Rhino.  It would be great if you would track this
down with the Rhino Developers and get back to us with potential
"high level" solutions.

> Is there a way to provide the applet with some correct context or 
optimal
> ordering so it does not do all these requests?

   I don't know, it may be.  We may also be unknowingly be configuring
Rhino improperly...