日食 + PyDev 在导入大量数据时变得极其缓慢
我正在尝试使用 Eclipse + PyDev 来学习 OpenGL 编程,但是当我输入
from OpenGL.GL import *
from OpenGL.GLUT import *
IDE 时变得非常慢!
好的。导入很多无用的东西并不是一个明智的想法,但它对于学习新库非常有用!
有什么帮助吗?
PS:我使用 Ubuntu 和 Eclipse Galileo。
I'm trying to use Eclipse + PyDev for studying OpenGL programming but when I type
from OpenGL.GL import *
from OpenGL.GLUT import *
IDE becomes extremely slow!
Ok. It isn't a smart idea import to much useless things but it's so useful for learning a new library!
Any help?
PS: I use Ubuntu with Eclipse Galileo.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可能想要禁用
Project ->菜单上自动构建
。继续使用 Python 构建文件是没有意义的,并且您有一个交互式控制台来测试您的代码。这根本不会影响代码完成。You may want to disable
Project -> Build Automatically
on the menu. It makes no sense to continue building files with Python, and you've got an interactive console to test your code. This will not affect code-completion at all.我正在尝试重现您的问题,但我无法在这里做到这一点 - 即使使用这些构造,它也不会变慢,所以,我认为您真正的问题是其他问题 - 最有可能的是JVM 没有获得足够的内存。
因此,请尝试执行以下操作:再次自动打开构建(如果您禁用了它——因为通常不建议这样做)并检查:
如果您安装了最新的 PyDev
强制内置中是否为“OpenGL”(应该是——应该自动完成,因此,只需仔细检查)。
阅读Eclipse 的最佳 JVM 设置是什么? 并使用这些设置(如果确实是内存问题,则需要引发“-Xmx”标志)。
如果没有办法解决这个问题,并且您确实觉得需要禁用自动构建,那么每当您使用某些需要该信息的函数时,请不要忘记手动运行构建 - 即:搜索全局变量:Ctrl+Shift+T,查找引用:Ctrl +Shift+G 在选定的标记中 - 可能还有一些我忘记的其他标记:)
I'm trying to reproduce your issue and I'm unable to do it here -- even with those constructs, it doesn't get slower, so, I think your real issue is some other issue -- the most likely is that the JVM is not getting enough memory.
So, please try doing the following: turn the build automatically on again (if you disabled it -- as it's not generally recommend) and check:
If you have the latest PyDev installed
Is "OpenGL" in the forced builtins (it should be -- that should be done automatically, so, just double-check).
Read What are the best JVM settings for Eclipse? and use those settings (if it's really a memory issue, the "-Xmx" flag is the one you need to raise).
If nothing solves that and you really feel disabling the automatic build is needed, don't forget to run the build manually whenever you use some function that needs that info -- i.e.: search globals: Ctrl+Shift+T, find references: Ctrl+Shift+G in selected token -- and probably a bunch of others I'm forgetting :)