Fixing Processing Java applet issues in Chrome?
August 5, 2010 4:52 PM   Subscribe

Do you how to solve these weird problems with Processing/Java applet rendering in Chrome?

I'm making a site for a friend's book, which includes a gallery of Processing pieces by different programmers: Example.

As far as I can determine, the pieces work beautifully in Safari 5 + older, stutter a little in Firefox 3.6 when the scrollbar is moved, and advance at a bizarre, glacial pace, frame by halting frame, in Chrome (all on OS X). Is there any way to fix this Chrome issue? Is it Mac-specific (I can't lay my hands on a Windows box right this minute)? People on the Processing forums seem a little baffled too -- perhaps the hive mind knows?

Thanks so much for your help.
posted by finnb to Computers & Internet (7 answers total) 1 user marked this as a favorite
For showing Processing based programs online, have you considered using ProcessingJS?
posted by artlung at 4:57 PM on August 5, 2010

Response by poster: Ooh, that's a really good idea. I'm a little new to all this (in case you couldn't guess). I'll give this a shot.
posted by finnb at 5:14 PM on August 5, 2010

One problem I have noticed between different OSes is that the memory allocation of applets can vary. I don't know if that is true on browsers also. You could try asking on StackOverflow
posted by a womble is an active kind of sloth at 5:53 PM on August 5, 2010

I get some flickering in Chrome and IE and a bit of stuttering in Firefox when moving the scrollbar, all in Windows Vista. After letting it go for a while in all three browsers, it seems to start to stutter more. The CPU usage is fairly high, 90% of one core on my machine. Maybe you could make it an upscaled 200x200 CA instead.
posted by demiurge at 6:13 PM on August 5, 2010

Are you thinking about including some video, btw? I would think visitors would really appreciate that. Java is a pain for a lot of web users.
posted by circular at 7:08 PM on August 5, 2010

If it is Java-related, it could have something to do with the fact that Chrome uses Plugin2 in OS X, while Safari (by default) and Firefox use Plugin1. Most likely just a Mac issue.

You could turn on the "In their own process" option in /Applications/Utilities/Java Preferences. This will enable Plugin2 for Safari. If it then starts to behave like Chrome, it may have something to do with the Java plugin.
posted by whiskeyspider at 7:24 PM on August 5, 2010

Response by poster: Thanks so much, everyone. Points well taken. circular, video would be a perfect solution, but part of my friend's book has to do with the aesthetics of things where their visual dimension is only one expression (of code, for instance) -- so it's important to have the code and the actually rendering product going. I agree with you about its painfulness, goodness knows.

I'll look into the upscaling, making the applets less demanding, and try to re-do these in ProcessingJS -- it looks like the javascript/canvas output will be lighter-weight and more reliable.

Thanks so much for your help!
posted by finnb at 7:32 PM on August 5, 2010

« Older Steampunk me an ipod dock   |   How to access WaPo archives online? Newer »
This thread is closed to new comments.