OSX 10.5.8 上 Netbeans 6.8 的 Java 设置以优化 CPU 使用 [英] Java Settings for Netbeans 6.8 on OSX 10.5.8 to optimize cpu usage
问题描述
抱歉,我有几个关于同一问题的问题.
Sorry I have several question relative to the same problem.
我在 OSX 10.5.8 和 Java 1.6.0_17 上使用 Netbeans 6.8,经过大约 5 分钟的工作,netbeans 进程(和 Java)的 CPU 使用率大约为 100%.
I am using Netbeans 6.8 on OSX 10.5.8 with java 1.6.0_17 and after about 5 minutes of work, the cpu usage of netbeans process (and java) are around 100%.
这通常是由于:- 转到声明"命令- 完成命令- 或多或少做 2 或 3 个基本操作,例如输入文本
It is often due to: - "go to declaration" command - completion command - more or less doing 2 or 3 basic actions such as entering text
我已经执行以下操作来提高性能,但没有成功:- 特定的 PHP netbeans- 删除所有不必要的插件和模块
I already do the following to enhance performance, without success: - specific PHP netbeans - remove all unnecessary plugin and modules
所以我的问题是如何解决这个问题并提高 OSX 上的 java 和 netbeans 性能?
So my question is how to solve this problem and enhance java and netbeans performance on OSX?
更准确地说:- 垃圾收集策略的改变会提高性能吗?以及如何做到这一点?- 更改默认 Java 外观会提高性能吗?哪个 L&F 最轻?- 我怎样才能更准确地回溯"这个问题?
More precisely: - will a change in garbage collection policy enhance performance? And how to do this? - will a change in default java look and feel enhance performance? Which L&F is the lightest? - how can I "backtrace" this problem more precisely?
很抱歉在同一篇文章中提出所有这些问题,但我对这个问题的想法已经不多了...提前感谢您的建议、提示和帮助!
Sorry for all this questions in the same post but I am running out of idea concerning this problem... Thank you in advance for your advices, hints and help!
推荐答案
您可以尝试增加 netbeans 的可用堆.设置在 $NETBEANS_HOME/etc/netbeans.conf
You could try to increase available heap for netbeans. The settings are in $NETBEANS_HOME/etc/netbeans.conf
有趣的是netbeans_default_options
默认值是:-J-Xms32m 我会以 -Xms256m -Xmx512m
开头和 -J(前缀)
The interessting one is netbeans_default_options
Default is: -J-Xms32m I would start with -Xms256m -Xmx512m
with -J (prefix)
来自 netbeans.conf
From netbeans.conf
If you specify the heap size (-Xmx) explicitely, you may also want to enable
# Concurrent Mark & Sweep garbage collector. In such case add the following
# options to the netbeans_default_options:
# -J-XX:+UseConcMarkSweepGC -J-XX:+CMSClassUnloadingEnabled -J-XX:+CMSPermGenSweepingEnabled
这篇关于OSX 10.5.8 上 Netbeans 6.8 的 Java 设置以优化 CPU 使用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!