Re: [GD-Windows] Background loading thread
Brought to you by:
vexxed72
From: Mat N. (BUNGIE) <Mat...@mi...> - 2006-09-08 21:35:04
|
1. Why burn a thread to do synchronous I/O? You can do sync I/O on the same thread and have more opportunity to interleave reads and other similar logic. 2. True overlapped I/O (NO_BUFFERING, ReadFileScatter, and IOCompletionPorts to avoid the event handle) is about as optimal as you can get. And it's easy to interrupt and all that other fun stuff that you'll want eventually. 3. If you are going to mix huge sequential reads and streaming, you can use asynchronous I/O or eat the logic cost of reading smaller buffers manually. MSN -----Original Message----- From: gam...@li... [mailto:gam...@li...] On Behalf Of Ivan-Assen Ivanov Sent: Friday, September 08, 2006 1:42 PM To: gam...@li... Subject: [GD-Windows] Background loading thread Hello, I'm in the process of reengineering our data loading process with the goal of moving as much as possible of the loading of art assets into a separate thread. Now, if all the ReadFile calls happen from a separate thread, devoted 100% to them, is there a good reason to inflict on myself considerable pain and suffering by using the overlapped I/O API? We have a perfectly good packfile/filesystem support which should be thread-safe for the most part (famous last words material, eh?) except for a few isolated places which can be mutexed out, and which will have to be thrown away to use overlapped API. I hope Windows has the common sense to switch away from a thread which is performing a lengthy synchronuous IO operation? What about a hypothetical other platform, that would happen be produced by the same OS vendor around the same OS kernel, would be in even greater need of offloading loading to another core, but wouldn't happen to be covered by NDAs? Does anyone have any related war stories to tell? Best regards, Assen ------------------------------------------------------------------------ - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=3Dlnk&kid=3D120709&bid=3D263057&dat=3D= 121642 _______________________________________________ Gamedevlists-windows mailing list Gam...@li... https://lists.sourceforge.net/lists/listinfo/gamedevlists-windows Archives: http://sourceforge.net/mailarchive/forum.php?forum_id=3D555 |