简体   繁体   English

Netbeans 8.0 和网络项目太慢

[英]Netbeans 8.0 and networks project are too slow

I have a VMware Virtual Machine running on my PC because I use it as a development environment.我的 PC 上运行着 VMware 虚拟机,因为我将其用作开发环境。 I'm running on the VM CentOS 6.5.我在 VM CentOS 6.5 上运行。 I have a Samba shared folder on that VM and I connect through "host-only" connection from Windows 7 to CentOS without any problem.我在那个虚拟机上有一个 Samba 共享文件夹,我通过“仅主机”连接从 Windows 7 连接到 CentOS,没有任何问题。

Now I create a project using a shared folder as project sources and opening Netbeans and wait for the project to be opened takes sometimes 15 min or more.现在我使用共享文件夹作为项目源创建一个项目并打开 Netbeans 并等待项目打开有时需要 15 分钟或更长时间。

I disable "background scanning" following instructions on this post but still to slow, any advice on this one?我按照这篇文章的说明禁用了“后台扫描”,但仍然很慢,对此有什么建议吗? What is the best approach?最好的方法是什么? Use remote project sources through SFTP connection?通过 SFTP 连接使用远程项目源?

The real fix would be a fix of your samba.真正的修复是修复你的桑巴舞。 There is very likely some locking due to some network timeout in it.由于某些网络超时,很可能存在一些锁定。 Most likely it is some WINS/DNS configuration problem.很可能是某些 WINS/DNS 配置问题。 Only you can debug it (tcpdump/strace the samba process).只有您可以调试它(tcpdump/strace samba 进程)。

However, the best approach is not the fix of your samba, but using a different version for deployment.但是,最好的方法不是修复您的 samba,而是使用不同的版本进行部署。 Your question makes likely that you have your development environment on your Windows host machine, and you deploy your code to your CentOS.您的问题很可能是您在 Windows 主机上拥有开发环境,并将代码部署到 CentOS。

Use a native filesystem on your host, typically bound it into a versioning system (most likely, git), and make the deployment a part of your build scripts.在主机上使用本机文件系统,通常将其绑定到版本控制系统(最有可能是 git),并使部署成为构建脚本的一部分。 For example, you could install a cygwin , and then upload your compiled code (or even the source) to your VM by an rsync .例如,您可以安装cygwin ,然后通过rsync将编译后的代码(甚至源代码)上传到您的 VM。 This rsync can already be called from your build script (like maven-exec-plugin in a pom.xml, if you use maven).这个 rsync 已经可以从你的构建脚本中调用(就像 pom.xml 中的 maven-exec-plugin,如果你使用 maven)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM