[Haskell-cafe] Ann: Win32-notify 0.1
bos at serpentine.com
Sun Apr 20 12:22:21 EDT 2008
Niklas Broberg wrote:
> So API suggestions would be most welcome!
Your challenge will lie in finding an API that can be implemented
efficiently on all concerned platforms. I don't know what the
characteristics of the Windows or OS X notification APIs are, but if you
use inotify on Linux, and you immediately issue a read every time select
tells you there's something to be read, you'll easily consume 70% of a
CPU when the filesystem gets busy.
With a little guile, you can reduce that overhead by two orders of
magnitude, to a fraction of a percent. It's not all that easy to do
this well, but using inotify naively is so crippling that you must do
it. Any higher-level API must account for factors like this.
More information about the Haskell-Cafe