Hacker News new | past | comments | ask | show | jobs | submit login

The article discusses a bottleneck in readdir(), not stat(). Running your command has the same problem as running ls:

    open(".", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = 5
    fcntl(5, F_GETFD)                       = 0x1 (flags FD_CLOEXEC)
    fchdir(5)                               = 0
    getdents(5, /* 2 entries */, 32768)     = 48
    getdents(5, /* 0 entries */, 32768)     = 0
    close(5)                                = 0
It's only reading 32k at a time, but the author had 500MB of data to be fetched.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: