Gtk progress bar not updating

11-Jun-2020 03:13

cpu: amd phenom2 x6 (more than enough for file transfer i assume) hdd 32mb cache/ 7200 rpm os : ubuntu 11.04 usb thumb drive is capable of 30mb write speed, using cp or gui i get around 10mbps, using my app i get around 5mbps but i believe thats due just to closing the out file.My entire source code is a bit long to post but i think thats all that would be needed to figure why the process is coming out so slow.Using fclose on my input and output file seems to take a bit too long.Does anyone have suggestions on how i could speed this code up on the file transfer portion?Asynchronous IO might allow your program to continue without blocking until completion.I say might because I've never done AIO on Linux, only on Windows. Can't tell about the OS unless I know how the drive is mounted (O_SYNCW or something like that.(You may or may not have noticed, depending on how the usb drive is mounted, that there's a delay after copying before it is safe to remove the device.) As hmccurdy seems to be thinking, the delay on closing the file is probably the OS flushing buffers and waiting for IO to complete.

But I don't know how to set percentage of bar,becuse the program is blocked in Load XFile Function. I read the on-line help on CProgress Bar and saw no way to make the change. The fact that the application was written in VC6 made it impossible to debug it on Vista 32, but because there were only a handful of changes we quickly isolated the problem to the change in progress bar code.

The video files i am transferring can range from 50mb to a couple of gigs so i would like to optimize the transfer.

I started threading the application but the issue seems to be in the file transfer portion.

Show us what you have and maybe you'll save someone else some time too.

I am saving a video file of known length , in seconds.

But I don't know how to set percentage of bar,becuse the program is blocked in Load XFile Function. I read the on-line help on CProgress Bar and saw no way to make the change. The fact that the application was written in VC6 made it impossible to debug it on Vista 32, but because there were only a handful of changes we quickly isolated the problem to the change in progress bar code.The video files i am transferring can range from 50mb to a couple of gigs so i would like to optimize the transfer.I started threading the application but the issue seems to be in the file transfer portion.Show us what you have and maybe you'll save someone else some time too.I am saving a video file of known length , in seconds.The purpose is to avoid inefficient use of system calls (actually reading or writing a single character to a disk file, "right now").