Complete.Org: Mailing Lists: Archives: freeciv-dev: January 2004:
[Freeciv-Dev] Re: list cleaning
Home

[Freeciv-Dev] Re: list cleaning

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: list cleaning
From: "Per I. Mathisen" <per@xxxxxxxxxxx>
Date: Fri, 23 Jan 2004 09:32:15 +0000 (GMT)

I want to move ahead on this one. I think my solution is the best one and
I am willing to code it (what remains to be done).

On Sun, 30 Nov 2003, Raimar Falke wrote:
> 5) lazydeletion with explicit pruning via global list of current
> genlists
>  - low code impact
>  - low speed impact
>  - low memory impact
>  - safe
>
> 5) looks like the clear winner but has the problem that it won't work
> without an genlist_destroy function.

A genlist_destroy has a low code impact, has no speed impact and I can add
a test on quit that does a quality assurance check that we have no missing
genlist_destroy calls in the codebase.

On Sun, 30 Nov 2003, Vasco Alexandre Da Silva Costa wrote:
> Better than 3, but I still don't like the fact that you get to test lists
> which haven't changed, plus when do you do the pruning? I like to keep
> things simple.

We can have a bool per list which is set to TRUE for lists that have
changed, and are set to FALSE when they are pruned. This way we do no
tests for lists that are not changed.

We do pruning once per turn. That is more than good enough.

  - Per



[Prev in Thread] Current Thread [Next in Thread]