Re: [Nautilus-list] Icon directory contents caching
- From: Thomas Cataldo <tomc compaqnet fr>
- To: Alex Larsson <alexl redhat com>
- Cc: nautilus-list lists eazel com
- Subject: Re: [Nautilus-list] Icon directory contents caching
- Date: 06 Oct 2001 16:38:47 +0200
> +
> +static gboolean
> +icon_dir_cache_contains (IconDirCache *cache, char *name)
> +{
> + char **file;
> +
> + file = cache->files;
> +
> + while (*file != NULL) {
> + if (strcmp (*file, name) == 0) {
> + return TRUE;
> + }
> + file++;
> + }
> +
> + return FALSE;
> +}
> +
I think it will be reasonably faster to use a hashtable here rather than
walking the whole list every time you want to find an icon in the cache.
But perhaps I'm missing something.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]