motion detection using lots of cpu

Questions? Suggestions? Need help? Talk about anything related to Yawcam...
Post Reply
rogerdpack
Posts: 4
Joined: Mon Jun 13, 2011 7:56 pm

motion detection using lots of cpu

Post by rogerdpack »

Hello.
I installed yawcam, set it to snapshot to a file 1 fps, and turned on motion detection. Then noticed that javaw was using 70% of my cpu! (I have an older box).
Turning off motion detection, it uses like 2% cpu.
I would have expected it to use motion detection "every second" to see if it needed to take a new snapshot. Perhaps that would be a better default? (dunno).
Thanks!
-roger-
z3r0c00l12
Moderator
Posts: 1210
Joined: Wed Jan 14, 2009 3:50 am

Post by z3r0c00l12 »

What are the specs of that CPU?
rogerdpack
Posts: 4
Joined: Mon Jun 13, 2011 7:56 pm

cpu usage

Post by rogerdpack »

p4 2.66 Ghz (it's pretty old...)

actually, now that I look a bit closer motion detection uses about 36% cpu (constantly).

I also noticed that if I bounced the number of "files to save" up to save 1_000_000
It also uses cpu 100% constantly. Possible culprit this thread:


"FileOutputThread" prio=6 tid=0x0094e800 nid=0xc50 runnable [0x011ef000]
java.lang.Thread.State: RUNNABLE
at java.io.WinNTFileSystem.getBooleanAttributes(Native Method)
at java.io.File.exists(Unknown Source)
at yawcam.FileOutputThread.run(FileOutputThread.java:156)

Locked ownable synchronizers:
- None

So the algorithm there might could stand to be changed a bit too.
Thanks!
-roger-
Post Reply