Re: [Q] is NSFileHandle's writeData method faster than the FSWriteFork?

2008-08-07 Thread JongAm Park
Hello. I implemented it to reduce # of disk I/O and used valloc and realloc. Because it should accumulate data between each callback from the FCP, I tried realloc them. And the result was... it is much faster than the original code. I even remove intermediate codes for threading! Thank you v

Re: [Q] is NSFileHandle's writeData method faster than the FSWriteFork?

2008-08-04 Thread James Bucanek
That probably won't gain you that much. Fractional page writes will still requires FSWRriteFork to first copy the data into its file buffer, which is where I suspect much of your current overhead is. Writing your data into a local, aligned, buffer shouldn't be too difficult to re-engineer. I

Re: [Q] is NSFileHandle's writeData method faster than the FSWriteFork?

2008-08-03 Thread JongAm Park
Thank you very much for the valuable information. I will try the 1st and the 3rd options, because the 2nd option will not be easily applicable withouth refactoring the current code a lot. Thank you again, Regards, JongAm Park On Aug 2, 2008, at 7:51 AM, James Bucanek wrote: JongAm Park

Re: [Q] is NSFileHandle's writeData method faster than the FSWriteFork?

2008-08-02 Thread James Bucanek
JongAm Park wrote (Friday, August 1, 2008 7:27 PM -0700): The function will write about 19200 bytes per every call. I'm going to write XDCAM 35 or 50 video data. What is curious was that saving files as QuickTime movie format from the Final Cut Pro takes about 20 secs f

Re: [Q] is NSFileHandle's writeData method faster than the FSWriteFork?

2008-08-01 Thread Jens Alfke
On 1 Aug '08, at 7:27 PM, JongAm Park wrote: I measured the performance and found out that the most of the time were spent with the FSWriteFork() function. Probably other parts should be streamlined also, but it would impact significantly if the file write can be faster. You should sample

Re: [Q] is NSFileHandle's writeData method faster than the FSWriteFork?

2008-08-01 Thread JongAm Park
Thank you, Jens Alfke for your reply. The function will write about 19200 bytes per every call. I'm going to write XDCAM 35 or 50 video data. What is curious was that saving files as QuickTime movie format from the Final Cut Pro takes about 20 secs for 1 minutes of XDCAM 35 video source, bu

Re: [Q] is NSFileHandle's writeData method faster than the FSWriteFork?

2008-08-01 Thread Jens Alfke
On 1 Aug '08, at 3:33 PM, JongAm Park wrote: I have some codes which were written in Carbon and we want to make its performance faster. I found out that most of the time is spent by a series of FSWriteFork() function. So, I would like to use any method which is faster than that. fwrite is

Re: [Q] is NSFileHandle's writeData method faster than the FSWriteFork?

2008-08-01 Thread Nick Zitzmann
On Aug 1, 2008, at 4:33 PM, JongAm Park wrote: Hello.. Ahnyong haseo, I have some codes which were written in Carbon and we want to make its performance faster. I found out that most of the time is spent by a series of FSWriteFork() function. So, I would like to use any method which is

[Q] is NSFileHandle's writeData method faster than the FSWriteFork?

2008-08-01 Thread JongAm Park
Hello.. I have some codes which were written in Carbon and we want to make its performance faster. I found out that most of the time is spent by a series of FSWriteFork() function. So, I would like to use any method which is faster than that. fwrite is one option but I also looked up a Cocoa me