-
- Downloads
Replace fcopy with CopyFile (Win32 API function) on Windows.
Thanks to Wilfred van Velzen (2:280/464) for the tip. CopyFile() reduced the 1GB file copy test (from and to CIFS/SMB) duration from 37 seconds to 5 seconds with very low CPU utilization! Created a wrapper for non-Windows OSes in xpdev/dirwrap. This is where non-Windows-OS-specific optimized versions may appear in the future, but for now it's just the previous fcopy() implementation (using a 256KB stack buffer). sbbs doesn't actually copy files very often, so this isn't as big of a deal as one might assume. The JavaScript global method: file_copy() also benefits from these improvements, so any scripts that use it (e.g. tickit.js) will also benefit. binkit.js has its own file-copy logic (using a 2MB buffer), so no change there.
Showing
- src/sbbs3/js_global.c 1 addition, 1 deletionsrc/sbbs3/js_global.c
- src/sbbs3/nopen.c 1 addition, 33 deletionssrc/sbbs3/nopen.c
- src/sbbs3/nopen.h 0 additions, 1 deletionsrc/sbbs3/nopen.h
- src/sbbs3/writemsg.cpp 1 addition, 1 deletionsrc/sbbs3/writemsg.cpp
- src/xpdev/dirwrap.c 36 additions, 0 deletionssrc/xpdev/dirwrap.c
- src/xpdev/dirwrap.h 4 additions, 0 deletionssrc/xpdev/dirwrap.h
Please register or sign in to comment