aronchick
aronchick

Reputation: 7128

What does it mean that "File Stats" are slow on Windows as the reason Ruby is slow?

In another question I asked (why is Rake test so slow), part of the response was that:

The reason is that file stat's in windows are dreadfully slow, and, since Ruby is written on Linux (and optimized for Linux), there hasn't been much work to make it faster.

Can someone explain this further?

Upvotes: 2

Views: 330

Answers (2)

Jacob Mattison
Jacob Mattison

Reputation: 51062

"File stats" mean calls to the operating system to get the status (e.g. permissions) for a file. Here's a really interesting post about it; the summary:

Today we have three different stat/chmod-models:

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)

I propose that b) should be replaced with c).

Upvotes: 3

Related Questions