[mythtv] Re:Channel change speed

Chris Eldredge eldrec at rpi.edu
Fri Sep 12 18:28:10 EDT 2003


I didn't look at the code but they might not be deleting the file.  But
even if you reopen the file with O_TRUNC, rather then unlink() then
reopening, the filesystem will still have to free all the previously used
blocks, which is O(n) time complexity for an n-block file.  They probably
don't pass the file handle between channel changes, which prevents the
option of simply seeking to the beginning.

My suggestion would be to rename the file, then have a background process
unlink it while in the foreground the original file is reopened and the
channel change continues without delay.

Chris Eldredge

> At 10:40 9/12/2003, you wrote:
>>That's cool that reiserfs is faster at deleting huge
>>files, but why are we blocking on the delete?  It
>>seems that we should be able to just tell it to delete
>>in the background, and then go on our merry ways
>>building up a new buffer while the first one gets
>>slowly broken down...
>
> I/ve been wondering throughout this discussion why it is necessary to
> DELETE the file in the first place. Why not just let it be, and reset the
> write pointer when it next needs to be used?
>
> sjf
>
>
> ***************************************************************
> Steven J. Finnegan, President
> Controlsoft Corporation
> Phone: (760) 747-5632
> WebSite: www.controlsoftcorp.com
> E-mail: sjf at controlsoftcorp.com
>
> ***************************************************************
>    _______________________________________________
> mythtv-dev mailing list
> mythtv-dev at mythtv.org
> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev
>



More information about the mythtv-dev mailing list