This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
The FileObject.getMIMEType() method is essencial for speed of DataObject.find(...) recognition. There is hundreds of loaders and each of them asks for mimetype of the same FileObject. That is why the method needs to be optimized, to quickly return the result in subsequent calls. This is not the case for current implementation of masterfs. It always touches a disk, which can be quite time consuming, especially on network drives. Surprisingly plain LocalFS is ok. Please fix masterfs as well.
Created attachment 59964 [details] Test that counts file access. OK for LocalFileSystemTest, not OK for MasterFileSystemTest
Reassigning to new module owner jskrivanek.
There always was a single-entry cache in the filesystems, but unfortunately it always checked the timestamp of the file, at least. Maybe the problem is only in the timestamp check...
Oh yes, it is indeed caused mostly by the lastModified calls according to the stack traces from: http://wiki.netbeans.org/attach/FitnessAgainstForgetfulness/disk-touches.txt
As Petr Nejedly pointed out it is not necessary to check lastModified for cached FileObject because it listens to file changes and discards cached data when file is changed. I also added test inspired by Jarda and removed obsolete test cases. http://hg.netbeans.org/core-main/rev/b66e3b3d3817