<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>O!Hacker Blog &#187; Jruby</title>
	<atom:link href="http://ohacker.com/tag/jruby/feed/" rel="self" type="application/rss+xml" />
	<link>http://ohacker.com</link>
	<description>anything to hack</description>
	<lastBuildDate>Thu, 12 Aug 2010 05:17:18 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>JRuby On Spring在spring框架中使用Jruby</title>
		<link>http://ohacker.com/2009/04/23/jruby-on-spring%e5%9c%a8spring%e6%a1%86%e6%9e%b6%e4%b8%ad%e4%bd%bf%e7%94%a8jruby/</link>
		<comments>http://ohacker.com/2009/04/23/jruby-on-spring%e5%9c%a8spring%e6%a1%86%e6%9e%b6%e4%b8%ad%e4%bd%bf%e7%94%a8jruby/#comments</comments>
		<pubDate>Fri, 24 Apr 2009 05:14:00 +0000</pubDate>
		<dc:creator>Tony</dc:creator>
				<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Jruby]]></category>
		<category><![CDATA[spring]]></category>

		<guid isPermaLink="false">http://ohacker.com/2009/04/23/jruby-on-spring%e5%9c%a8spring%e6%a1%86%e6%9e%b6%e4%b8%ad%e4%bd%bf%e7%94%a8jruby/</guid>
		<description><![CDATA[昨天尝试在Spring中使用脚本语言，比如jruby，发现非常不方便，最主要的一点就是ruby class必须继承某一个java的接口，而其他bean调用时也是调用这个接口类型的对象。jruby的动态性基本丧失了。唉！ 相关日志JRuby的性能优化(update)Why is Spring So Important?Spring包结构以及各个包之间引用关系说明Spring Annotation(IOC篇)Spring Annotation(AOP篇)Ruby:Timezone synchronization function(跨时区同步时间方法)Ruby:string to date Or date to string用ruby写的一个网络爬虫程序Ruby 递归删除文件目录Ruby on Rails单元测试(Unit Test)]]></description>
		<wfw:commentRss>http://ohacker.com/2009/04/23/jruby-on-spring%e5%9c%a8spring%e6%a1%86%e6%9e%b6%e4%b8%ad%e4%bd%bf%e7%94%a8jruby/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>JRuby的性能优化(update)</title>
		<link>http://ohacker.com/2009/04/23/jruby%e7%9a%84%e6%80%a7%e8%83%bd%e4%bc%98%e5%8c%96update/</link>
		<comments>http://ohacker.com/2009/04/23/jruby%e7%9a%84%e6%80%a7%e8%83%bd%e4%bc%98%e5%8c%96update/#comments</comments>
		<pubDate>Thu, 23 Apr 2009 15:56:00 +0000</pubDate>
		<dc:creator>Tony</dc:creator>
				<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Jruby]]></category>

		<guid isPermaLink="false">http://ohacker.com/2009/04/23/jruby%e7%9a%84%e6%80%a7%e8%83%bd%e4%bc%98%e5%8c%96update/</guid>
		<description><![CDATA[JRuby wiki上列出了性能优化的四条建议：1、调优编译器，JRuby早就弃暗投明跟随XRuby走上了编译这条牛B的道路，将Ruby Script编译成字节码，因此这个环节是断断不能忽略的。两种编译方式：AOT模式：直接生成class文件，脱了Ruby这层皮，咱就是人见人“爱”的java了。JIT模式：充分利用成熟的jit技术，咱不全脱，朦胧美才是真的美。默认从0.9.9版本开始就是开启的，关闭的话（要我说还不如全脱）jruby -J-Djruby.jit.enabled=false2、关闭ObjectSpaceObjectSpace是Ruby用来操作所有运行时对象的模块，这个功能相当牛x。这个的实现在c ruby里是比较容易的，但是对于JRuby代价就比较昂贵了，其实就大部分情况下你基本用不到这个东东，那么最好就是关闭它，JRuby提供了jruby -J-Djruby.objectspace.enabled=false选项来关闭它。3、开启线程池我们知道，在c ruby中的线程是绿色的轻量级线程，因此运行时就动不动开个百来十个“线程”跑一跑充下款爷；然而在JRuby中，线程的实现那可是实打实的本地线程（也就是Ruby线程与java线程一比一），你这么动不动上百个线程那不慢才怪了。因此JRuby提供了线程池选项，运行时尽可能地满足你的要求开线程，但是当短命的Ruby线程重复创建的时候，这些线程将被复用，这在大多数情况下能提高性能表现，特别是在每次调用都启动一个线程的情况下。不过具体效果还是要测试的实际数据说话。jruby -J-Djruby.thread.pooling=true 4、使用Java &#8220;server&#8221;模式虚拟机，地球淫都知道jruby -J-server myscript.rb5、尽量使用最新的jdk，在我的测试中，jdk6跑jruby是效率最高的。 相关日志JRuby On Spring在spring框架中使用JrubyRuby:Timezone synchronization function(跨时区同步时间方法)Ruby:string to date Or date to string用ruby写的一个网络爬虫程序Ruby 递归删除文件目录Ruby on Rails单元测试(Unit Test)Eclipse3.4的Ruby支持]]></description>
		<wfw:commentRss>http://ohacker.com/2009/04/23/jruby%e7%9a%84%e6%80%a7%e8%83%bd%e4%bc%98%e5%8c%96update/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
