每执行一次 Scala 应用要花好长时间,难道我的开发方式不对?

144 views
Skip to first unread message

Yiding He

unread,
Dec 6, 2011, 9:08:41 PM12/6/11
to scalacn
Scala 是个好东东没错,但每次改好程序重新运行的时候,启动程序都要花上七八秒钟,这个效率太低了。Scala 是不是有什么方便的开发方式?

--
                       致
礼!
                         yidi...@gmail.com

Xuefeng Wu

unread,
Dec 6, 2011, 9:15:29 PM12/6/11
to sca...@googlegroups.com
用最新的scala版本,编译速度会有提高。
可以开scala fsc进行快速编译。

建议用最新的sbt做项目开发.

2011/12/7 Yiding He <yidi...@gmail.com>

--
                      致
礼!
                        yidi...@gmail.com

--
您收到此邮件是因为您订阅了 Google 网上论坛的"Scala中文社区"论坛。
要向此网上论坛发帖,请发送电子邮件至 sca...@googlegroups.com
要取消订阅此网上论坛,请发送电子邮件至 scalacn+u...@googlegroups.com
若有更多问题,请通过 http://groups.google.com/group/scalacn?hl=zh-CN 访问此网上论坛。


Freewind

unread,
Mar 16, 2012, 12:08:47 AM3/16/12
to sca...@googlegroups.com
更换cpu到i7级别(或e3 1230),内存升至8G,操作系统装64位,给scala程序设置大内存,可有效加快scala编译速度。

为了scala,我半年内升级电脑两次

Xuefeng Wu

unread,
Mar 16, 2012, 12:32:23 AM3/16/12
to sca...@googlegroups.com
用SSD硬盘或内存硬盘编译速度是soso的


2012/3/16 Freewind <nowi...@gmail.com>

--
您收到此邮件是因为您订阅了 Google 网上论坛的“Scala中文社区”论坛。
要在网络上查看此讨论,请访问 https://groups.google.com/d/msg/scalacn/-/t2VmDYy5334J

Freewind

unread,
Mar 16, 2012, 1:19:42 AM3/16/12
to sca...@googlegroups.com
话说我用了ramdisk,只把要编译的项目放在了里面,但发现速度提高不明显。是我用法不对吗?


On Friday, March 16, 2012 12:32:23 PM UTC+8, Xuefeng Wu wrote:
用SSD硬盘或内存硬盘编译速度是soso的


2012/3/16 Freewind <nowi...@gmail.com>
更换cpu到i7级别(或e3 1230),内存升至8G,操作系统装64位,给scala程序设置大内存,可有效加快scala编译速度。

为了scala,我半年内升级电脑两次


On Wednesday, December 7, 2011 10:08:41 AM UTC+8, Yiding He wrote:
Scala 是个好东东没错,但每次改好程序重新运行的时候,启动程序都要花上七八秒钟,这个效率太低了。Scala 是不是有什么方便的开发方式?

--
                       致
礼!
                         yidi...@gmail.com

--
您收到此邮件是因为您订阅了 Google 网上论坛的“Scala中文社区”论坛。
要在网络上查看此讨论,请访问 https://groups.google.com/d/msg/scalacn/-/t2VmDYy5334J

要向此网上论坛发帖,请发送电子邮件至 sca...@googlegroups.com
要取消订阅此网上论坛,请发送电子邮件至 scalacn+unsubscribe@googlegroups.com

Xuefeng Wu

unread,
Mar 16, 2012, 1:21:07 AM3/16/12
to sca...@googlegroups.com
eclipse要重新设置

2012/3/16 Freewind <nowi...@gmail.com>
要在网络上查看此讨论,请访问 https://groups.google.com/d/msg/scalacn/-/CkTTi1HThLsJ

要向此网上论坛发帖,请发送电子邮件至 sca...@googlegroups.com
要取消订阅此网上论坛,请发送电子邮件至 scalacn+u...@googlegroups.com

若有更多问题,请通过 http://groups.google.com/group/scalacn?hl=zh-CN 访问此网上论坛。



--
Best Regards,
Alan Wu/吴雪峰

-----------------

Global R&D Center,Shanghai,Carestream Health
Email:xuefe...@carestreamhealth.com
Tel:(86-21)3852 6101
Rayco(Shanghai) Medical Products Co., Ltd.
锐珂(上海)医疗器材有限公司

Xuefeng Wu

unread,
Mar 16, 2012, 1:28:10 AM3/16/12
to sca...@googlegroups.com
把eclipse的workspace放在RAM Disk里。

eclipse.ini 参考
-startup
plugins/org.eclipse.equinox.launcher_1.0.201.R35x_v20090715.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.gtk.linux.x86_1.0.200.v20090520
-product
org.eclipse.epp.package.java.product
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
384m
-vmargs
-Dosgi.requiredJavaVersion=1.5
-server
-XX:PermSize=256m
-XX:MaxPermSize=256m
-Xss2m
-Xms1G
-Xmx1G
-XX:MaxGCPauseMillis=10
-XX:+UnlockExperimentalVMOptions
-XX:+UseG1GC



2012/3/16 Xuefeng Wu <xuefe...@carestream.com>

Freewind

unread,
Mar 16, 2012, 2:25:39 AM3/16/12
to sca...@googlegroups.com
没错,我就是这么做的。之前是AMD athlon X3 445,效果不明显。现在换成了E3 1230,因速度可接受就没试了。

你机器配置如何?
把eclipse的workspace放在RAM Disk里。

eclipse.ini 参考

2012/3/16 Xuefeng Wu <xuefe...@carestream.com>
--
Best Regards,
Alan Wu/吴雪峰

-----------------

Global R&D Center,Shanghai,Carestream Health

Freewind

unread,
Mar 16, 2012, 2:26:17 AM3/16/12
to sca...@googlegroups.com
后面这几个参数关键吗?

-XX:MaxGCPauseMillis=10
-XX:+UnlockExperimentalVMOptions
-XX:+UseG1GC

把eclipse的workspace放在RAM Disk里。

eclipse.ini 参考

2012/3/16 Xuefeng Wu <xuefe...@carestream.com>
--
Best Regards,
Alan Wu/吴雪峰

-----------------

Global R&D Center,Shanghai,Carestream Health

Xuefeng Wu

unread,
Mar 16, 2012, 2:32:23 AM3/16/12
to sca...@googlegroups.com
不是特别关键

2012/3/16 Freewind <nowi...@gmail.com>
要在网络上查看此讨论,请访问 https://groups.google.com/d/msg/scalacn/-/3NQBvctOih8J

要向此网上论坛发帖,请发送电子邮件至 sca...@googlegroups.com
要取消订阅此网上论坛,请发送电子邮件至 scalacn+u...@googlegroups.com

Xuefeng Wu

unread,
Mar 16, 2012, 2:36:36 AM3/16/12
to sca...@googlegroups.com
我机器是i5 2300

2012/3/16 Freewind <nowi...@gmail.com>
要在网络上查看此讨论,请访问 https://groups.google.com/d/msg/scalacn/-/_RBhBCUzyYcJ

要向此网上论坛发帖,请发送电子邮件至 sca...@googlegroups.com
要取消订阅此网上论坛,请发送电子邮件至 scalacn+u...@googlegroups.com

Freewind

unread,
Mar 16, 2012, 2:55:25 AM3/16/12
to sca...@googlegroups.com
这个级别的cpu应该够用了。等我项目文件多的时候,再试试ramdisk

Sparkle

unread,
Mar 17, 2012, 3:14:35 AM3/17/12
to sca...@googlegroups.com
scala编译器的启动速度是比较慢。打开fsc吧

>>>>>>>> 要取消订阅此网上论坛,请发送电子邮件至 scalacn+u...@googlegroups.com


>>>>>>>> 若有更多问题,请通过 http://groups.google.com/group/scalacn?hl=zh-CN 访问此网上论坛。
>>>>>>>
>>>>>>>
>>>>>> --
>>>>>> 您收到此邮件是因为您订阅了 Google 网上论坛的"Scala中文社区"论坛。
>>>>>> 要在网络上查看此讨论,请访问 https://groups.google.com/d/msg/scalacn/-/CkTTi1HThLsJ
>>>>>>
>>>>>> 要向此网上论坛发帖,请发送电子邮件至 sca...@googlegroups.com

>>>>>> 要取消订阅此网上论坛,请发送电子邮件至 scalacn+u...@googlegroups.com


>>>>>> 若有更多问题,请通过 http://groups.google.com/group/scalacn?hl=zh-CN 访问此网上论坛。
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Best Regards,
>>>>> Alan Wu/吴雪峰
>>>>>
>>>>> -----------------
>>>>>
>>>>> Global R&D Center,Shanghai,Carestream Health

>>>>> Email:xuefe...@carestreamhealth.com


>>>>> Tel:(86-21)3852 6101
>>>>> Rayco(Shanghai) Medical Products Co., Ltd.
>>>>> 锐珂(上海)医疗器材有限公司
>>>>
>>>>
>>> --
>>> 您收到此邮件是因为您订阅了 Google 网上论坛的"Scala中文社区"论坛。
>>> 要在网络上查看此讨论,请访问 https://groups.google.com/d/msg/scalacn/-/_RBhBCUzyYcJ
>>>
>>> 要向此网上论坛发帖,请发送电子邮件至 sca...@googlegroups.com

>>> 要取消订阅此网上论坛,请发送电子邮件至 scalacn+u...@googlegroups.com


>>> 若有更多问题,请通过 http://groups.google.com/group/scalacn?hl=zh-CN 访问此网上论坛。
>>
>>
> --
> 您收到此邮件是因为您订阅了 Google 网上论坛的"Scala中文社区"论坛。

> 要在网络上查看此讨论,请访问 https://groups.google.com/d/msg/scalacn/-/xs34htiWX4QJ
>
> 要向此网上论坛发帖,请发送电子邮件至 sca...@googlegroups.com
> 要取消订阅此网上论坛,请发送电子邮件至 scalacn+u...@googlegroups.com


> 若有更多问题,请通过 http://groups.google.com/group/scalacn?hl=zh-CN 访问此网上论坛。

--
blog: http://weavesky.com
twitter: sparklezeng
weibo: sparklezeng

Reply all
Reply to author
Forward
0 new messages