TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Discussion of JVM performance from JRuby/Clojure creators

41 点作者 bgray超过 15 年前

2 条评论

old-gregg超过 15 年前
I have been curious about JRuby for a long time, and relatively recently I got a chance to work on a JRuby-powered Rails application that hits a database, uses external Java APIs and serves pages.<p>The experience has been miserable: the "warm-up problem" is so pronounced that development reminds me of my C++ days when I had to compile my code. Rake tasks are slow as hell. Running unit tests has been so painful that we hacked Rails to run tests via Web interface. Memory consumption is through the roof: JVM-based Ruby eats (or should I say wastes?) about 2-3x times more RAM that RubyEE 1.8.6<p>You keep hearing RAM is cheap, but for small startups no it isn't - just look at EC2/SliceHost/Linode prices, and 1GB instances aren't going to cut it if you're running this pig (JVM) doing anything non-trivial.<p>Moreover, accessing Java classes from JRuby isn't nearly as smooth as using something like Closure. Ruby strings aren't Java strings and it applies to arrays, hash tables, everything. Even importing JARs isn't that trivial. Moreover, your Ruby code which consumes Java libs looks more or less like Java in a Halloween costume. NOT FUN.<p>The bottom line: yes, Rails on JRuby is about twice as fast (in our application) but you take a shocking hit to your workflow by the startup lag and you pay with an increased RAM wastage by JVM when you deploy.<p>Next time I am needing some Java libraries in a Rails app, I am hosting an instance of Tomcat and exposing that library via a simple REST service using plain Java.
评论 #952858 未加载
评论 #953195 未加载
评论 #953223 未加载
评论 #953168 未加载
评论 #952701 未加载
评论 #952586 未加载
pohl超过 15 年前
<i>This is something that might be a good candidate for openjdk and/or icedtea. The only problem is the build seems to be regularly broken in the repository. - Andrew Oliver</i><p>I'm surprised that a project that large doesn't use something like tinderbox or cruise control.