[General] Re Batik/Rhino hangs on Chrome on a Mac

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

[General] Re Batik/Rhino hangs on Chrome on a Mac

Peter Fraser
Thanks for trying it.

Can I ask...

1. What JRE are you running?

2.  What (if anything) do you see in the Java console?

I see the following:

src=http://www.spatialmedia.com/lively/batik90r1/index.svg
Opening URL: http://www.spatialmedia.com/lively/batik90r1/index.svg
@4213>console log started
@89161>loaded basic library
@201161>Loaded platform-independent graphics primitives
@374308>added 'kicker' -a delayed to call to window.onload (which is not
being called by Batik etc)
@384876>Loaded basic DOM manipulation code
@511615>loaded Core.js
@566514>http://www.spatialmedia.com/lively/batik90r1/Text.js loaded in
119889 ms
@936974>loaded Network.js
@1059924>http://www.spatialmedia.com/lively/batik90r1/Tools.js loaded in
63611 ms
@1154098>http://www.spatialmedia.com/lively/batik90r1/Examples.js loaded
in 92101 ms
@1157808>scratch is running
@2080799>Module load check done. 3 modules loaded.
@2080802>kicker running.
@2085440>created empty world
@2088818>http://www.spatialmedia.com/lively/batik90r1/anonymous_module_1 
loaded in 3375 ms
@2095861>http://www.spatialmedia.com/lively/batik90r1/anonymous_module_2 
loaded in 7040 ms
@2095866>http://www.spatialmedia.com/lively/batik90r1/anonymous_module_0 
loaded in 10418 ms

-yes, those numbers are milliseconds  :-()

regards
Pete F





Reply | Threaded
Open this post in threaded view
|

[General] Re Batik/Rhino hangs on Chrome on a Mac

Chris Cunnington-4
OK, this is interesting.

I downloaded the latest Java stuff into my Mac using Software Update.
I then opened up all three browsers - Chrome, Firefox, and Safari.
In the first two this exercise is a total fail. In Safari it took me seven
minutes for the clock to appear the first time and six minutes the second
time. That's better than half an hour.

I'm running JRE 6, the latest that Apple is sending out. I looked up Batik.
It's an svg framework thing for use with Apache. I looked up Rhino. It's a
JavaScript engine written by Mozilla.
I learned what the Java console was, turned it on, and here's the output:

@651>console log started
@15838>loaded basic library
@35727>Loaded platform-independent graphics primitives
@62512>added 'kicker' -a delayed to call to window.onload (which is not
being called by Batik etc)
@64465>Loaded basic DOM manipulation code
@86279>loaded Core.js
@95951>http://www.spatialmedia.com/lively/batik90r1/Text.js loaded in 20723
ms
@160391>loaded Network.js
@183875>http://www.spatialmedia.com/lively/batik90r1/Tools.js loaded in
11273 ms
@200082>http://www.spatialmedia.com/lively/batik90r1/Examples.js loaded in
15475 ms
@200648>scratch is running
@354330>Module load check done. 3 modules loaded.
@354331>kicker running.
@355193>created empty world
@356778>http://www.spatialmedia.com/lively/batik90r1/anonymous_module_1loaded
in 1580 ms
@360589>http://www.spatialmedia.com/lively/batik90r1/anonymous_module_2loaded
in 3809 ms
@360598>http://www.spatialmedia.com/lively/batik90r1/anonymous_module_0loaded
in 5399 ms

And It takes half the time for me, a mere 5 seconds, to load
anonymous_module_0. That's half the time of yours, but I don't see the point
of this metric, if the whole process takes six minutes.

I like this investigation, and I'm learning things here. But I don't see the
point of running LK in an applet.

And "scratch is running" (at @200648) What is that? I've been looking at
Scratch, the Squeak app for kids today, so is that it? Or is it some Java
thing?

... actually, I looked@the error log in my locally deployed LK, and it
references an attempt to download a file called Scratch.js. There is no such
file in the downloaded source files. But, in index.xhtml there is an attempt
to load a file called that. I guess it ignores the fact that it can't find
it.

Naw, that can't be it. How can "scratch be running" if there is no scratch
file in the source code to run?

Chris
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://livelykernel.sunlabs.com/pipermail/general/attachments/20100104/60fbf4f4/attachment.html 


Reply | Threaded
Open this post in threaded view
|

[General] Re Batik/Rhino hangs on Chrome on a Mac

Dan Ingalls-5
Chris Cunnington <[hidden email]>  wrote...

>OK, this is interesting.
>
>I downloaded the latest Java stuff into my Mac using Software Update.
>I then opened up all three browsers - Chrome, Firefox, and Safari.
>In the first two this exercise is a total fail. In Safari it took me seven minutes for the clock to appear the first time and six minutes the second time. That's better than half an hour.

For me it's 2-3 times slower (dual core 2.4GHz)

>...
>And It takes half the time for me, a mere 5 seconds, to load anonymous_module_0. That's half the time of yours, but I don't see the point of this metric, if the whole process takes six minutes.
>
>I like this investigation, and I'm learning things here. But I don't see the point of running LK in an applet.

The one, the only reason to my thinking, is to get LK running in Internet Explorer.
If we had a practical (this is not yet) version of LK running in Internet Explorer
(and other places like Opera, etc),
we would have a much better story for real adoption.
What Peter has done is great, and it would be wonderful to be able to show all
the LK demos in IE.  More to the point, people could then start publishing
real web content in LK knowing that everyone could see it.

There are a couple of other paths to this same goal.

One is the Renesis SVG plugin that runs in IE.  We got that *almost* working a year
ago, but there are difficulties with JavaScript compatibility as well.

In my opinion, the most promising approach@this point is to use Google's O3D
plugin with the canvas version of LK.  This has the sterling side-effect of bringing
along the V8 JS engine as well.  It also has the enticing side-effect of leaving
real 3-D just a few function calls away, once it is running.

Anyone feel like trying this?  I feel bad that I haven't already, but I'm distracted right now.

>And "scratch is running" (at @200648) What is that? I've been looking@Scratch, the Squeak app for kids today, so is that it? Or is it some Java thing?
>... actually, I looked@the error log in my locally deployed LK, and it references an attempt to download a file called Scratch.js. There is no such file in the downloaded source files. But, in index.xhtml there is an attempt to load a file called that. I guess it ignores the fact that it can't find it.

No connection to Scratch the Squeak app.  Scratch.js is just a file name we
use for simple experiments -- if it's there it will be loaded; if not it will be ignored.

>Naw, that can't be it. How can "scratch be running" if there is no scratch file in the source code to run?

Dunno about the "is running" message.

        - Dan


Reply | Threaded
Open this post in threaded view
|

[General] Re Batik/Rhino hangs on Chrome on a Mac

Peter Fraser
In reply to this post by Chris Cunnington-4
Hi Chris

it sounds a little like java hasn't been installed for Chrome and
Firefox   -can you run [hidden email] ( or
http://www.spatialmedia.com/misc/JSniff.htm )?

 >>
In Safari it took me seven
minutes for the clock to appear the first time and six minutes the second
time. That's better than half an hour.

<<

Interesting.

The half hour thing is something of a curiosity@the moment -and my
working assumption is that this is all about whether Rhino optimization
runs.
I was getting 8 minute-ish startup using a slightly older Batik version
-but to run LK9.0 I needed to make some minor changes to the Batik-Rhino
interface and use a newer Rhino (for the JS 1.5 stuff in LK9.0).

I know that batik/Rhino *can* start LK in comparable time to browsers
(because Batik Squiggle does so). When I get some time to work on this
some more, I'll put together a package with "an LK9.0 capable squiggle".



 >>
I like this investigation, and I'm learning things here. But I don't see the
point of running LK in an applet.
<<

The obvious win would be to provide a solution (albeit involving a
plugin) for IE users. Current IE lacks SVG or Canvas, and the javascript
is very slow (but the latter@least is going to change -MS are working
on a "v8 like" javascript engine).

For me, the real appeal of IE is to act as a safety net. LK on browsers
is a thrilling high-wire act -if you should trip (ie if the browser
won't do the job) there is no net to catch you. With java, you@least
have options (ie a safety net). You can "fix" the browser and still
deploy (as per my earlier post on the general list today)

 >>
And "scratch is running" (at @200648) What is that? I've been looking at
Scratch, the Squeak app for kids today, so is that it? Or is it some Java
thing?
<<

No -it isn't *that* scratch (sadly) afaik. In fact, it was missing (and
is optional), but Batik was choking on the lack of it, so rather than
remove it from the script declarations I provided a 'hello i am running'
implementation.




regards
Pete





Reply | Threaded
Open this post in threaded view
|

[General] Re Batik/Rhino hangs on Chrome on a Mac

Philip Weaver
In reply to this post by Chris Cunnington-4
Also, Google Chrome Frame to run Lively in IE.

http://code.google.com/chrome/chromeframe/

Phil

On Tue, Jan 5, 2010@12:10 AM, Dan Ingalls <[hidden email]> wrote:

>
>
> >
> >I like this investigation, and I'm learning things here. But I don't see
> the point of running LK in an applet.
>
> The one, the only reason to my thinking, is to get LK running in Internet
> Explorer.
> If we had a practical (this is not yet) version of LK running in Internet
> Explorer
> (and other places like Opera, etc),
> we would have a much better story for real adoption.
> What Peter has done is great, and it would be wonderful to be able to show
> all
> the LK demos in IE.  More to the point, people could then start publishing
> real web content in LK knowing that everyone could see it.
>
> There are a couple of other paths to this same goal.
>
> One is the Renesis SVG plugin that runs in IE.  We got that *almost*
> working a year
> ago, but there are difficulties with JavaScript compatibility as well.
>
> In my opinion, the most promising approach@this point is to use Google's
> O3D
> plugin with the canvas version of LK.  This has the sterling side-effect of
> bringing
> along the V8 JS engine as well.  It also has the enticing side-effect of
> leaving
> real 3-D just a few function calls away, once it is running.
>
> Anyone feel like trying this?  I feel bad that I haven't already, but I'm
> distracted right now.
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://livelykernel.sunlabs.com/pipermail/general/attachments/20100106/fcf9f744/attachment.html