Re: Patch to fix #314139 [REVISION PROPOSAL]



On Wed, 2006-06-14 at 16:26 +0300, Sivan Greenberg wrote:
> On Wed, 2006-06-14 at 11:46 +0200, Alexander Larsson wrote:
> 
> > They are not cached. You have to implement that yourself. The reason to
> > use g_stat directly is just to avoid lots of levels of indirection and
> > bloat when its not needed (i.e. you're only doing this for local files
> > anyway).
> 
> Ah, so this isn't as easy as it seems at first place. Is there anything
> in the nautilus file io stack that can help me implement the caching of
> those calls? (including the g_stat() call)

I don't see what is hard about it. Just save the (boolean) result of
your function call and its arguments, and then compare the stored values
first in the function.

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Alexander Larsson                                            Red Hat, Inc 
                   alexl redhat com    alla lysator liu se 
He's an unconventional moralistic Green Beret looking for 'the Big One.' She's 
a chain-smoking insomniac safe cracker descended from a line of powerful 
witches. They fight crime! 




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]