diminish7 / rave

A Google Wave robot client framework for Ruby
http://github.com/diminish7/rave
MIT License
62 stars 8 forks source link

Robot takes long time to initialize #31

Open bil-bas opened 14 years ago

bil-bas commented 14 years ago

Although this might not be fixable, if we can't improve this, I think that appengine/jruby might be a bit of a non-starter compared to the native appengine solutions!

diminish7 commented 14 years ago

Took the 0.2 label off of this issue - this is really an ongoing thing.

I did some super unscientific benchmarking, and found that it takes about 17 seconds to initialize a Rave robot, and it takes about 5 seconds to initialize a Java robot. I'm not sure if we can do anything about it - JRuby has a slow startup time. The JRuby team is constantly working on it, so hopefully it will get better from their end. I'm not sure what else we can do from our end, but I'll leave the issue open so it's always in the back of our minds... If anyone's got any ideas, I'm all ears...

bil-bas commented 14 years ago

Hmm, that certainly doesn't seem an unreasonable comparison of times, since JRuby is obviously forcing a massive amount of startup work compared to native Java. The problem is more about the time that a robot is not used after a period of time where any use for that first few seconds times out. Perhaps there is a way to at least prevent the timeout before JRuby can start up (so timeout for us after something like 30 seconds, rather than whatever the default is, say 10 or 15 seconds) would make all the difference for us. I haven't got a clue how the appengine system works, so wouldn't know if that sort of thing would be possible.

Thanks for taking a look at this nevertheless. Perhaps we should contact the JRuby people to see if they have any advice for such a situation. Must be affecting all of their projects just as much as ours...

diminish7 commented 14 years ago

Yeah, I'll look into changing the timeout. Seems like it might be possible. The JRuby team is definitely aware of the slow startup times. It came up about 100 times at JRubyConf last month :) And they say they're working on it.

diminish7 commented 14 years ago

One thought on this is that we can hit their capabilities.xml from the appengine_deploy rake task. That will initialize the robot, so then when they actually invite it to a conversation for the first time, it will already be up and running. Not sure if that's a great idea, just something to consider...