日食 + PDT 性能技巧?
我最近想为我的 PHP 副项目获得一个不错的 IDE,并通过搜索找到了 Eclipse+PDT。 虽然它还没有完全达到 Visual Studio 的水平,但在这方面它已经非常好并且比 Notepad++ 更好了。 我什至可以进行一些调试,尽管它有很多问题。
但有一件事困扰着我。 它似乎存在某种奇怪的性能问题,因此它大约每分钟一次使用大量 CPU。 就其本身而言,这并不明显,但如果您同时做其他事情(例如看电影或玩《雷神之锤 3》),就会时不时地产生恼人的问题。
诚然,我的电脑不是最先进的(Sempron 2200+,具有 1GB RAM),但它对于所有这些来说肯定绰绰有余。
另一个性能问题是,我习惯了 Visual Studio,只要您键入兼容的符号,IntelliSense 就会弹出。 在这里你需要等待片刻。 有什么办法可以让它立即打开吗?
PS 也许有更好的 PHP 免费软件 IDE?
添加: Stefan Schmidt 建议更改自动激活速度。 这似乎有一个错误。 我设置的越小,它就越无法打开。 例如,当它是200时,当有东西要打开时,它几乎一直打开。 在 10 时,它(至少)不为静态类成员打开。 是什么赋予了?
I recently wanted to get a decend IDE for my PHP side-projecs, and by searching SO found Eclipse+PDT. Although it's not quite at the level of Visual Studio yet, it's pretty nice and better than Notepad++ for this purpose. I can even debug somewhat, although it's pretty glitchy.
But there is one thing that is bugging me. It seems to have some kind of weird performance issue, whereupon it it uses lots of CPU about once a minute or so. By itself this is not noticeable, but if you do something else at the same time (like watch a movie, or play Quake 3), it produces an annoying hicup now and then.
Granted, my computer is not state-of-the-art (Sempron 2200+ with 1GB of RAM), but then it's certainly more than enough for all of this.
Another performance question is that I'm used to Visual Studio where IntelliSense pops up as soon as you type a compatible symbol. Here you have to wait for a moment. Is there any way to make it open up instantly?
P.S. Perhaps there's an even better freeware IDE for PHP?
Added: It was suggested by Stefan Schmidt to change Auto-Activation speed. It seems that there is a bug with this. The smaller I set it, the more it fails to open at all. For example, when it's 200, it opens mostly all the time when there is something to open. At 10 it doesn't open (at least) for static class members. What gives?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(7)
我想我找到了它!
鉴于:
a) Eclipse for PHP (Eclipse PDT) 几乎每天都会更新并完成每日构建。 我只能假设这是来自一个由非常敬业且有能力的开发人员组成的团队,他们只想要与您做同样的事情。
b) 我们中只有一小部分人来这里抱怨我们的 CPU 在尝试编辑 PHP 代码时耗尽。
观察结果:
a) 我已经关闭了首选项框中的几乎所有项目,但无济于事。
解决方案:
根据我过去使用软件的经验,尤其是通常对其他人来说效果很好的大型黑匣子。 当面对似乎不符合传统理论的情况时……我喜欢采取非常规的做法。 在这种情况下……只需处理“小事”即可。
在这种特殊情况下,这意味着我:
换句话说...
一旦我消除了所有警告...CPU 就停止了最大化!
更新到最新的 Eclipse 版本,然后花时间修复警告和/或删除所有不必要的源代码(无论如何都会删除)...CPU 恢复到“正常”。
换句话说...
问题不在于 Eclipse PDT 无法正常工作...
...而是它工作得太好了!
它所做的正是它的设计目的......在键盘被认为处于休眠状态时检查(并重新检查)源代码中的警告。
所以...
就这样...
注意“问题”窗口中的所有警告,并采取措施将警告数量减少到零!
然后在这里报告您的发现。
老实说,我简直不敢相信我安装的 Ubuntu 10.04(32 位)在价值 500 美元的 Compaq Presario 上运行得有多好。 这是一个梦想,我所做的只是照顾“小事”。
干杯,
佩里
I think I found it !!!
Given:
a) That Eclipse for PHP (Eclipse PDT) is updated just about everyday complete with daily builds. I can only assume this is from a team of very dedicated and competent developers who only want the same thing you do.
b) That only a small portion of us have been coming here complaining about our CPU maxing out while trying to edit PHP code.
Observations:
a) I have turned off just about every item in the preferences box to no avail.
Solutions:
In my past experience with software, especially large black boxes that normally work well for others. When faced with a situation that does not seem to respond to conventional theory... I like to do the unconventional. In this case... simply take care of the "little things".
In this particular case this means that I:
In other words...
Once I eliminated ALL THE WARNINGS.... The CPU stopped maxing out !!!
After updating the to latest Eclipse build and then taking the time to either fix the warnings and/or remove ALL unnecessary source code (that was slated to removed anyway)... the CPU returned to "normal".
In other words...
The problem was not that Eclipse PDT wasn't working properly...
...it was that it was working TOO GOOD !!!
It was doing precisely what it was designed to do... check ( & recheck ) for warnings in your source code while the keyboard was considered dormant.
So...
There you go...
Pay attention to ALL the warnings in your "Problems" window and do what it takes to reduce the number of warnings to ZERO !!!
And then report back here with your findings.
I honestly cannot believe just how well my Ubuntu 10.04 (32 bit) installation is operating on a $500 Compaq Presario. It's a dream and ALL I did was take care of the "little things".
Cheers,
Perry
它可能是垃圾收集器。 尝试不同的 JVM 或不同的垃圾收集算法。 它可能会帮助您缩短暂停时间。 使用 JRockit 您可以设置垃圾的暂停时间目标集电极。
例如,您可以
在 eclipse.ini 文件中 设置: 有关如何将 Eclipse 设置为在 JRockit 上运行
It could be the garbage collector. Try a different JVM or a different garbage collection algorithm. It might help you shorten the pause times. With JRockit you can set a pause time target for the garbage collector.
For instance you could set:
in you eclipse.ini file. See this blog for some information on how you can set up Eclipse to run on JRockit
你可以尝试这个:
Selec Project => 从菜单中清理并选择所有 php 项目。 这可能需要一段时间(如果您有许多/大型项目),但之后应该会变得更快。
对于替代的免费 IDE,您可以尝试 NetBeans。 从版本 6.5 开始,它具有完整的 php 支持,对我来说,它比 Eclipse+PDT 更快,并且更稳定/内存消耗更小。
you could try this:
Selec Project => clean from menu and select all php projects. This could take a while ( if you have many/large projects ), but then it should get faster.
For an alternate free IDE you could try NetBeans. From version 6.5 it has full php support, and for me it's faster than Eclipse+PDT, and more stable / memory consupting.
PDT 3.1 和 eclipse 4.2 (juno) 存在已知问题。
https://bugs.eclipse.org/bugs/show_bug.cgi?id=385272
这是解决方案:
打开不同的透视图(例如java,但不是php)并重新启动eclipse。 之后您可以安全地切换回 php 视角。 Eclipse 不会有性能问题。
还提到此处
There are known issues with PDT 3.1 and eclipse 4.2 (juno).
https://bugs.eclipse.org/bugs/show_bug.cgi?id=385272
This is the solution:
Open a different perspective (for example java, but not php) and restart eclipse. Afterwards you can savely switch back to php perspective. Eclipse will have no performance issues.
Also mentioned here
对于第二个问题:
您可以在此处指定代码辅助显示所需的延迟时间。
我对你的其他问题没有解决方案,但也许如果你等到12月29日,你的问题就会被2.0版本解决。
编辑:不是解决方案,但可能是解决方法:尝试降低 PDT 进程的进程优先级。
For your second question:
There you can specify the delay it takes for the Code Assist to show up.
I have no solution for your other problem, but perhaps if you wait until 29th of December your problems will be solved by the 2.0 version.
Edit: Not a solution, but perhaps a workaround: Try lowering the prcess priority of your PDT process.
我在使用 PDT 和 Ganymede 时没有遇到任何问题。您可能想尝试(作为实验)从 一体化 Eclipse PDT + Zend 调试器包 zip 并看看它是否运行得更好?
您可以使用多个不同的 eclipse,因为它们不需要任何安装并且不会相互干扰 - 只需打开并使用
Ive had no hiccups using PDT with Ganymede .. you might want to try (as an experiment) downloading and copying eclipse from the All-in-One Eclipse PDT + Zend Debugger Package zip and see if it runs better?
You can use multiple different eclipses as they don't need any installation and won't interfere with each other - just open and use
还有另一个项目用于向 Eclipse 添加 PHP 支持:PHPeclipse。 我知道当 PDT 还很年轻时,人们经常选择 PHPeclipse 因为 PDT 的性能问题,但我不能说,两者的当前版本在性能(和功能)方面如何比较,因为我退出了 PHPeclipse 开发活动相当多过去。
如果您的性能问题确实令人困扰,您可能想尝试一下 PHPeclipse。
There is another project for adding PHP support to Eclipse: PHPeclipse. I know that when PDT was still young, people often choose PHPeclipse because of performance problems with PDT, but I cannot say, how the current versions of both compare with respect to performance (and features), as I quit my PHPeclipse development activities quite some time ago.
If your performance problem is a real show stopper, you might want to give PHPeclipse a try.