Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jgit-dev] Avoiding stat calls (again)

This issue pops up again and again, I guess when one stops being tired of it. I got an idea that does not involve JNI.

If the time stamp hasn't changed, couldn't we assume size didn't change either? I believe
all OS:es update the timestamp when we write to a file, not just on open/close.

Given some definition of old, we could avoid retrieving the file size if the (old) timestamp
in the index equals the one on disk when checking for a possible modification. 

What would old be? 2 seconds (FAT) or much more?

-- robin

Back to the top