From: Donal K. F. <don...@ma...> - 2004-02-25 09:38:25
|
Hi everyone At the weekend I was reading this month's Dr Dobbs, and in between all the bits about security written by people who don't realize what a multi-layered problem it is (and the usual Web-Services junk) there was an article on doing high performance asynchronous I/O. Much of it was on IO Completion Ports, comprehension of which I'll leave to David Gravereaux, but there was also some discussion of UNIX select(), and how /dev/poll was a higher-capacity API onto the same thing. Now, this set me thinking about whether Tcl's notifier could be adjusted to use this new API. The general semantics is pretty much the same, of course, so scripts and even most (all?) C extensions would never see the difference. It would mean a substantial rewrite of some of the notifier, but I think that could be done fairly easily. The main problem that I can see is working out whether to use this new API or the old select() stuff (which is definitely still needed for older systems.) But I reckon that we could probably get away with just making it a feature to be turned on explicitly at configure time (using the principle of not making software too smart for its own boots ;^)) I'm also told by Pat Thoyts that kqueue() is another API in this same general area. I know less about it though (not that I know much about /dev/poll stuff, just what I read in the article.) Anyway, my basic question is whether it is a good idea to pursue this sort of thing further? I think we can localize the changes within the core well enough that the only way people will notice the difference is that their scripts suddenly go a bit faster in their fileevent handling. Donal. |