toaster icon indicating copy to clipboard operation
toaster copied to clipboard

-w eats CPU

Open AeliusSaionji opened this issue 12 years ago • 4 comments

The -w chews on a rather disturbing amount of CPU (12% of 4.43GHz).

Normally there isn't much of a wait but I had something wrong with explorer and the toasts weren't running consistently, which is how I noticed.

AeliusSaionji avatar May 04 '13 23:05 AeliusSaionji

Ah. Yeah this is one of my less brilliant moves. Since there is an indeterminate amount of time for the notification to be active I was just spinning in a while loop waiting for the toast notification to return. I'll do some experiments with turning that into a polling loop with a thread sleep and see if that gets things set right.

nels-o avatar Jul 06 '13 23:07 nels-o

I'm going to hesitantly close this as fixed, pending more issues. Instead of spinning, it should now use a polling loop and Thread.Sleep to be a little more frugal with system resources.

nels-o avatar Jul 07 '13 00:07 nels-o

There seems to be a trick in getting this to work with 8.1- on my other two computers I had to play around with it for a bit to get it working.

I'm having strange behavior on my newest laptop (doesn't work, gives an error when using -w with -m, no error but waits indefinitely with -t, etc). I can't get it to work, but....

This gives me a chance to test out your fix! On this laptop, i7-4500U clocked at 1.80GHz, toast is using 25% of the CPU. :(

AeliusSaionji avatar Dec 28 '13 22:12 AeliusSaionji

Time to reopen this one then.

nels-o avatar Dec 29 '13 18:12 nels-o