-
Semper Vaporo
-
- Posts: 331
- Joined: Sat Oct 09, 2010 11:51 am
by Semper Vaporo » Fri Mar 04, 2016 10:32 am
Yes, there is a delay between an event actually occurring in the scene and the playing of the sound file by the computer to tell us about it.
Part of that is "processing time" to determine that motion has occurred and then to determine if it is a person or something else, and then scheduling the playing of the sound file. I am finding that the major portion of the delay is not in the SH processing, but in the operating system getting around to executing the software to actually play the requested sound file.
I believe the bottleneck in this process is the speed of the Harddrive where the program (CODEX) resides that processes the sound file, and the sound file itself.
SH tells the OS to play a sound file and the OS then had to load from the disk the program that handles it, which then in turn retrieves the sound file from the disk to actually send the data to the sound card to play it. Depending on the sizes of the directories that these 2 files (CODEX and the sound file itself) reside in, it is possible that the drive must churn a while before it finds the CODEX file name, and then it has to churn some more to actually load the program. The process repeats for the search and load for the sound file itself. If the directories are long/large, it might take extra time to load enough of it to find the desired files.
Normally, in a computer, there is a buffer that can hold a sizeable portion of the directories and that speeds up the searches because the directory is already in the buffer, but in such a disk intensive process as SightHound (lots of data is flowing to and from the disk drive on a near constant basis) these buffers get overwritten rather quickly, so they are near useless for speeding up the search of directories.
One thing that MIGHT shorten the delay would be to move the OS (at least the CODEX files) and the Sound files to a separate drive so that maybe the directories for those two will remain in the disk buffers for that drive and make the search for them faster (after the first time they are called, which fills the buffer) because the buffer won't be overwritten by SH doing its other work of storing video and updating the database.
Another thing would be to get a faster drive. Look for drives with faster rotation speeds (5400 is slower, 7200 is faster... I think those are the two most common speeds these days). The ultimate would be to use a solid state drive because then there is no rotational latency to contend with (reads occur immediately instead of having to wait for the disk to spin around to get the desired sector to pass under the read/write head).
Beyond that, I don't think there is much that can be done to reduce the delay between a motion event occurring and the computer playing the sound file to alert us to the event.
The folk at SightHound might have different ideas on this, but that is what I have determined in my experimenting with computers (both using SightHound and other systems over 45 years as a programmer myself). (My next system will have a solid state drive to see if it proves my theories!)
Semper Vaporo,