XCode 在 VMWare 中编译速度极慢

发布于 2024-10-28 22:05:10 字数 475 浏览 3 评论 0原文

OSX 10.6.6 安装在 Windows 7 主机上的 VMware 内部。整体性能很好,但是编译时间急剧增加(纯 MacOS 上为 2-3 分钟,而为 1 小时)。这是配备 Core i5 和 Core i5 的现代机器。 4GB 内存。 以下是 XBench 结果: http://db.xbench.com/merge.xhtml?doc1=517768& doc2=1&setCookie=true 我认为问题可能出在 4k 写入值极其缓慢,但我不知道如何改进。

有什么方法可以提高性能吗?

UPD1:未使用交换区,有足够的内存用于所有操作 磁盘速度也无关,因为我的另一台 Macbook 显示了更糟糕的结果,并且编译速度快了数百倍。

UPD2:问题已解决,请参阅下面的我的答案

The OSX 10.6.6 is installed inside VMware on Windows 7 host. The overall performance is great, However, the compiling time increased dramatically (1 hour against 2-3 min on pure MacOS). It's modern machine with Core i5 & 4GB RAM.
Here are the XBench results:
http://db.xbench.com/merge.xhtml?doc1=517768&doc2=1&setCookie=true
I think the problem could be in extremely slow 4k write value, but I don't know how to improve this.

Is there any way to increase performance?

UPD1: swap is not used, there is enough memory for all operations
the disk speed is also not related, since my another Macbook shows event worse results, and compiles hundreds times faster.

UPD2: problem solved, see my answer below

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(6

梨涡少年 2024-11-04 22:05:11

分享经验和解决方案。

我的 Xcode 运行良好,但当我构建一个项目(即使是空项目)时,最多需要 10 分钟。

解决方案:
转到 Xcode ->偏好->源代码控制:禁用源代码控制

现在项目构建和运行只需几秒钟。

Sharing experience and solution.

My Xcode was running fine but when I build a project (even an empty one), it would take up to 10 minutes.

SOLUTION:
Go to Xcode -> Preference -> Source Control: Dissable Source Control

Now projects build and run in a matter of seconds.

别靠近我心 2024-11-04 22:05:11

在 VMWare 中,您应该有一个设置,可以将一个或两个核心完全专用于虚拟机。假设你有四核,也许给 MacOSX 2 或 3 核?如果您有双核并且已为虚拟机分配了 1 个核心(并且问题仍然存在),那么我不能说太多!

In VMWare, you should have a setting where you can dedicate one or two cores entirely to the virtual machine. Assuming you have quad core, maybe give MacOSX 2 or 3 cores? If you have dual-core and you've allocated 1 core to the VM (and the problem still persists), i can't say much then!

云淡月浅 2024-11-04 22:05:11

很高兴您的问题得到解决,但我想分享一下我提高 vmware 性能的经验。请安装适用于 macOS 的 VMware 工具,它们位于 .iso 文件中。

为 MAC 操作系统安装 VMware 工具的步骤:

1) 打开虚拟机电源。
2)右下角有一些弹出符号(全屏模式下通常不会出现)。右键单击 CD/DVD 符号。
3) 单击设置。在此窗口中,确保选择 darwin.iso。
4) 关闭此窗口并再次右键单击 CD/DVD 符号。
5) 单击连接。将出现一个名为 darwin(300) 的图标。
6) 该文件内有工具。安装它们!

It's good that your problem is solved, but I want to share my experience for improving vmware performance. Please do install VMware tools for mac os and they are present in .iso file.

Steps to install VMware tools for MAC OS:

1) Power on your VM.
2) At the right bottom they are some pop-up symbols(These are usually not present in full screen mode). Rightclick the CD/DVD symbol.
3) Click setting. In this window make sure that darwin.iso is selected.
4) Close this window and again right click CD/DVD symbol.
5) Click connect. An icon will appear with name darwin(300).
6) Inside this file tools are present. Install them!

浮云落日 2024-11-04 22:05:11

问题是:包含路径的递归搜索非常慢。如果非递归,一切都会顺利进行。

The problem was: VERY SLOW recursive searching of include paths. If non-recursive, everything works smooth.

叫思念不要吵 2024-11-04 22:05:11

我也遇到了同样的问题,但我想在这里分享我的个人经验。

  1. 我的CPU RAM容量是4 GB,所以我分配了3.5 GB给VMWare
    因此整个操作系统的速度非常慢。
  2. 于是有一天我清楚地观察了VMWare的设置,终于找到了
    解决方案。如果我们分配的 RAM 内存超过推荐值,那么
    您的操作系统也会挂起。对于我的系统推荐的 RAM
    内存是2048MB,调整后现在操作系统很快。
  3. 我们可以在“硬件”内的“设备”选项中调整 RAM 内存。为了
    澄清一下,我附上了屏幕截图。
    在此处输入图像描述

I also got the same problem, But i want share my personal experience here.

  1. My CPUs RAM capacity is 4 GB, So i allocated 3.5 GB to the VMWare
    because of this it was very slow the entire operating system.
  2. So one day i clearly observed the VMWare settings, finally found the
    solution. If we allocate the RAM memory more than recommended then
    also your operating system hangs. For my System the recommended RAM
    memory is 2048MB, after adjusting this now OS is fast.
  3. We can adjust the RAM memory in Devices option, inside Hardware. For
    clarification here i am attaching the screen shot.
    enter image description here
这样的小城市 2024-11-04 22:05:11

我遇到了同样的问题,我按如下方式修复了它:

  1. 通过更改 vmware 配置文件以禁用内存,我获得了最大的提升
    存储在 .vmem 文件中。在我的 .vmx 文件中我添加了:
 mainMem.useNamedFile = "FALSE"

  prefvmx.minVmMemPct = "100"
  1. 为来宾设置最大内核数
  2. 使用 swift 和 XCode 编程时, 。删除所有未真正使用的注释 /* */。

I had the same problem and I fixed it as follow:

  1. Most boost I got with changing my vmware config file to disable memory
    stored in .vmem file. In my .vmx file I added :
  mainMem.useNamedFile = "FALSE"

  prefvmx.minVmMemPct = "100"
  1. Setting max cores to the guest
  2. When programming with swift and XCode. Remove all comments /* */ not really used.
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文