I measured battery usage with and without X and found a big difference (6W vs 11W). Of course my wmii config causes only a small part but I mentioned many wakeups by it. So I try a short profiling and see many time are consumed for all the thread stuff (synchronize, pass, etc). I thought about Cooperative Multithreading and want to know what you think about.
I would try it with two threads: One Thread waits that an event occurs and sleeps meanwhile. The other handles the status bar updates. This scheduler used a queue for update events (e.g two buttons A updates every 2 and B every 5 secs): | A | A | B | A | -- first sleep 2 secs, execute update method for A, sleep another 2 secs, call A, sleep one sec, call B, sleep one sec, call A. Of course some corrections required because update needs some time too.
I don't know if this effects any performance improvements but I give it a try. What do you think?
I measured battery usage with and without X and found a big difference (6W vs 11W). Of course my wmii config causes only a small part but I mentioned many wakeups by it. So I try a short profiling and see many time are consumed for all the thread stuff (synchronize, pass, etc). I thought about Cooperative Multithreading and want to know what you think about.
I would try it with two threads: One Thread waits that an event occurs and sleeps meanwhile. The other handles the status bar updates. This scheduler used a queue for update events (e.g two buttons A updates every 2 and B every 5 secs): | A | A | B | A | -- first sleep 2 secs, execute update method for A, sleep another 2 secs, call A, sleep one sec, call B, sleep one sec, call A. Of course some corrections required because update needs some time too.
I don't know if this effects any performance improvements but I give it a try. What do you think?