Re: [Nautilus-list] Icon directory contents caching
- From: Alex Larsson <alexl redhat com>
- To: Yoann Vandoorselaere <yoann mandrakesoft com>
- Cc: <nautilus-list lists eazel com>
- Subject: Re: [Nautilus-list] Icon directory contents caching
- Date: Sat, 6 Oct 2001 10:23:13 -0400 (EDT)
On 6 Oct 2001, Yoann Vandoorselaere wrote:
> On Sat, 2001-10-06 at 04:49, Alex Larsson wrote:
>
> Hi,
>
> here are some comment about the implementation.
>
> [...]
>
> You use an array in order to store icons informations. Using a
> dynamically allocated array for this task seem overkill to me as you're
> gonna use realloc() which take a lot of time, and so should be avoided
> for obvious reasons.
realloc doesn't take lots of time. The time it takes is insignificant
compared to the disk accesses and syscalls that readdir() + opendir()
does.
> Second, is that if you want to keep using this algorithm (which could
> really be improved, it's linear currently), you should use linked list
> as it seem to fit better with what you're currently trying to achieve.
>
> Now, I would be a really good thing to use an hash table to store list
> of icon informations. You would just use the icon filename to generate
> the key.
I could modify it to use a hashtable instead of an array. That is a very
easy change. I dunno if it is worth it though. I'll try on monday.
/ Alex
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]