Eclipse挂起用于JavaScript文件的复制/剪切 [英] Eclipse hangs on copy/cut for JavaScript files

查看:130
本文介绍了Eclipse挂起用于JavaScript文件的复制/剪切的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经安装了Eclipse Kepler和NodeEclipse插件。对于NodeEclipse的性能原因,我已禁用JavaScript文件的内容助理。



问题:
每当我复制或剪切一些行文件(ctrl + c / ctrl + x),CPU使用率达100%,eclipse进程占用所有内存(> 1GB)。我认为一些GC的冲击正在发生。增加JVM最大内存是一个选项,但不是1GB足够的eclipse?



这可能是一些内存泄漏。这是Nodeclipse的具体问题吗?在日食中有没有任何解决方法/设置?



已编辑:
当我双击一个变量时,CPU泵送到100%,持续3-4秒,下降。我的标记已经不见了。这只是发生在路由/ * .js文件,而不是公用文件夹。调查更多,我发现包含 require('< package-name>')的评论行解决了这个问题,为什么?

解决方案

找到解决方案:



转到窗口>首选项> JavaScript>编辑器> Mark Occurrences
并取消选中复选框。应该这样做。



此问题的原因:



当您按 ctrl 为了复制/粘贴,它假设是一个ctrl + mouseOver操作,我们在点击一个方法/变量名称以达到其声明点之前,或访问其文档。因此,它尝试查找当前在鼠标光标下的文本的所有出现以及其声明点和文档。



希望这有助于:)


I have Eclipse Kepler and NodeEclipse plugin installed. For NodeEclipse's performance reasons I have disabled content assistant for JavaScript files.

Problem: Whenever I copy or cut some lines in JS files (ctrl+c / ctrl+x), the CPU usages goes 100% and the eclipse process eats up all memory (>1GB). I think some GC thrashing is happening. Increasing JVM max memory more is an option, but isn't 1GB enough for eclipse?

This could be some memory leak. Is this specific problem with Nodeclipse? Are there any workarounds/settings in eclipse to diable?

Edited: When I double click a variable, CPU pumps to 100% for 3-4 seconds, comes down. I have mark occurences already disbled. This is happending only for route/*.js files and not for public folder. Investigating more, I find that commenting line containing require('<package-name>') solves this problem, why?

解决方案

found the solution:

go to Window>Preferences>JavaScript>Editor>Mark Occurrences and unselect the checkboxes. That should do it.

Reason for this problem:

When u press ctrl for copy/paste, it assumes that is a "ctrl+mouseOver" operation, that we do before clicking on a method/variable name to reach its declaration point, or access its documentation. Hence, it tries to find all the occurrences of the text currently under the mouse cursor, along with its declaration point and documentation.

Hope this helps :)

这篇关于Eclipse挂起用于JavaScript文件的复制/剪切的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆