在另一个问题中,我问(为什么 Rake test so slow ,部分回应是:
原因是文件统计在 窗户太慢了, 因为Ruby是在Linux上编写的(和 为Linux优化),没有 做了很多工作来加快速度。
有人能进一步解释吗?
“文件状态”是指调用操作系统以获取文件的状态(例如权限)。这里有一个 really interesting post 关于它;摘要:
今天我们有三个不同的 stat/chmod型号: a) UNIX-model (used in Ruby on Unix) b) Ruby-Windows-model (used in Ruby on Windows) c) Windows-model (used in Windows-applications using stat/chmod calls) 我建议更换b) 用C)。
今天我们有三个不同的 stat/chmod型号:
a) UNIX-model (used in Ruby on Unix) b) Ruby-Windows-model (used in Ruby on Windows) c) Windows-model (used in Windows-applications using stat/chmod calls)
我建议更换b) 用C)。
http://en.wikibooks.org/wiki/Ruby_Programming/Installing_Ruby#Windows_is_slow