Re: A tale of waiting



2009/6/23 Bastien Nocera <hadess hadess net>:
> On Tue, 2009-06-23 at 22:16 +0200, Benjamin Otte wrote:
>> I have been on a quest to improve performance of the file chooser
>> lately. This post is about this process: what I measured, what I
>> learned and what I patched.
> <snip>
>>  * Getting the mime type
>> Getting the mime type for a file requires opening the file and
>> checking the first bytes against the known patterns for files. Both
>> operations take time. The mime type also is usually not required.


> It will only open the file if the suffix of the file can't be used,
> please read the shared-mime-info spec.

Yes, I've been looking into this code recently, there's a fast mode,
and it's only when the fast mode happens to be ambiguous, that a short
stream of the file is taken for sniffing.

> <snip>
>>  * Fix the usage of a filter on the mime type. Currently we don't
>> query the mime type (it requires file sniffing after all), so we never
>> get matches.
>
> As above.
>
> In majority of cases it should be a string match.
> <snip>
>> And now the obvious question: Should I just merge it to master when
>> I'm done with the regressions?
>
> Personally, I'd rather see the changes merged incrementally, rather than
> a wholesale rewrite going in. Makes it much easier to pinpoint what
> broke the file chooser (as is likely to happen, it's not like software
> is ever bug-free).
>
> Cheers
>
> _______________________________________________
> gtk-devel-list mailing list
> gtk-devel-list gnome org
> http://mail.gnome.org/mailman/listinfo/gtk-devel-list
>



-- 
Un saludo,
Alberto Ruiz


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