I've seen this talk called Creativity with Ruby-Processing by Joanne Cheng and noticed how the changes she made in her code were reloading very quickly.
When I write Processing code in Sublime Text I hit Build and what happens is my build system first terminates the running sketch by killing its corresponding java.exe
process, then uses processing-java.exe
to start a new sketch. This takes 5-10 seconds depending on the machine it's running on and on the sketch.
In the interest of tightening the feedback between code and effect, I'm curious if there's something better I can do in my build system to reload my sketch faster.
Maybe adapt what Ruby Processing watch is doing?
In the video, she says that she's using Ruby's
watch
command. All this command does is detect changes to the file she's working on, and relaunches the sketch whenever she hits save. This is not much different from what you're already doing, and in fact it does take 5-10 seconds for some of her sketches to come up.You could probably do pretty much exactly what she's doing, but I doubt it would save you any time. Your launches won't become faster; you just won't have to press the build button. I would argue that the added complexity isn't worth the time it takes to press one button.
That also requires you to introduce Ruby dependencies into your process. If you want a Java solution, you might check out JRebel. Again, I would argue that this added complexity is not worth it, especially since the whole point of Processing is to keep code as simple as possible. But it's really up to you.