snarlydwarf;184338 Wrote: > "open" doesn't mean "copy". > > It just means "find this file and return a 'handle' to it for later > operations". > > Opening a file should take very little time (unless you have something > like a large directory where it can take time for the OS to find the > file in the directory), since it just finds the file, checks > permissions and performs no other operations (well maybe updating the > 'access time' of the file, but that is effectively in the directory or > inode not the file itself). > > Somewhere deep in the OS, there is a table of open files.. the "handle" > points to an item in this table. > > It is somewhat similar with network operations... the handle is just > abstracted another layer. > > Yeah, the timing -really- sounds like it is reading the whole file. It > seems that it shouldnt have to do that from the SMB docs. I know it > doesn't have to do that at all with NFS. (NFS isn't perfect by any > means.. but random access to files is completely transparent.)
I can see how it might be possible for the OS to query the volume directory about a file, and then get a response, "Yes, we have that file. This portion of it is on sector X of the hard drive, and that portion of it is on sector Y ...," etc. And then with some intelligence, SlimServer looks into the first and last portions of the file that the directory points to for tag information. But, if the OS must open the file, then it would need to read all of the files bytes and load them into memory -- and bring them across the network to do so. If you select a file's properties in Windows, you see name, last modifed, size, etc. and regardless of selecting a big or small file, that dialog appears instantly. My guess is that this information is not coming from the file in real time, but was added to the disk's directory when the file was last modified. -- jonheal Jon Heal says: Have a nice day! http://www.theheals.org/ ~~~ SB3 (wired - 6.3.1) | Home-brew PC running XP Pro | DENON DRA-395 | PSB Stratus Bronze (2) | Outlaw Audio LFM-2 (1) | DIY Speaker Cables | Dayton Audio Interconnects ------------------------------------------------------------------------ jonheal's Profile: http://forums.slimdevices.com/member.php?userid=2133 View this thread: http://forums.slimdevices.com/showthread.php?t=33041 _______________________________________________ discuss mailing list [email protected] http://lists.slimdevices.com/lists/listinfo/discuss
