Re: Help with effective algorithm
- From: "Picho" <SPAM_picho@xxxxxxxxxxxx>
- Date: Fri, 6 May 2005 12:12:59 +0300
this is getting more a question than helping thread but anyway,
thinking outloud, seems to me it can go only two ways (as allways...)
either you have a data structure that supports your need (object graph->Tree
structure of some sort)
or you have a flat and fast data structure that is supported by a fast graph
rendering algorithm.
on the first option, you have a long construction time and a large memory
consumption.
on the other option, you have a "skinny" memory consumption, but a longer
construction time for each request.
seems to me, analyticly speaking, that it narrows down to one question (for
me at least):
how often do you query for these graphs/paths?
if its often, I would take the first approach, since all the paths are
visible and constructed,
if not... well I will not.
but : this is a question, not an answer. I am trying to learn something here
too. I am ignorant when it comes to performance and memory usage.
"Tamir Khason" <tamir-NOSPAM@xxxxxxxxxxxxxxxxx> wrote in message
news:eC4EOfhUFHA.628@xxxxxxxxxxxxxxxxxxxxxxx
> Picha, thank you for reply
>
>> why do you use a Hashtable to hold all the data in the first place?
> The data I recieve in input is two hashtables from selialized source first
> is ID/Value information
> the second is Parent/Child relation, where Child and Parent are IDs from
> first hashtable
>
>> why not go on the old safe tree structure?
> It makes sense if trees are small. We are speaking about at least 900K
> items with complicated relationships, thus the parsing of even just
> creation of TreeView will take a while
>
>> maybe each node will hold a HashTable to the child nodes?
> Not nessesery, 'cos it might be Child-Of-Child structures
>
> --
> Tamir
>
>> "Tamir Khason" <tamir-NOSPAM@xxxxxxxxxxxxxxxxx> wrote in message
>> news:%23k1G3UhUFHA.228@xxxxxxxxxxxxxxxxxxxxxxx
>>>I have parent-child hashtable with more then 900K items and I have to
>>>build all pathes for this. E.G
>>> Key ParentKey
>>> 1 0
>>> 2 1
>>> 3 2
>>> 4 8
>>> 5 3
>>> 6 1
>>> 7 3
>>> 8 7
>>> To build:
>>> 0-1-2-3-5
>>> 0-1-6
>>> 0-1-2-3-7-8-9-4
>>> This is just example.
>>>
>>> I tried 5 different algorithms, but noting gave me good performance.
>>> Please assist
>>>
>>>
>>>
>>>
>>> --
>>> What dot.NET? Just ask:
>>> "Please, www.dotNET.us !"
>>>
>>
>>
>
>
.
- Follow-Ups:
- Re: Help with effective algorithm
- From: Tamir Khason
- Re: Help with effective algorithm
- From: Roni
- Re: Help with effective algorithm
- References:
- Help with effective algorithm
- From: Tamir Khason
- Re: Help with effective algorithm
- From: Picho
- Re: Help with effective algorithm
- From: Tamir Khason
- Help with effective algorithm
- Prev by Date: Counting the Items in a dataset
- Next by Date: Re: a question about this book
- Previous by thread: Re: Help with effective algorithm
- Next by thread: Re: Help with effective algorithm
- Index(es):
Relevant Pages
|