[ansel] gallery ordering issue

Heath S. Hendrickson heath at outerspaceconsultants.com
Sun Apr 4 22:10:19 PDT 2004


Ben Chavet wrote:

>>> Or put another way, does anyone know where the slowdown is coming 
>>> from specifically in order to look at it closer and maybe fix it?
>>
>>
>> *What* slowdown?
>
>
> I think we're still talking about the performance issues when there is 
> a lot of
> data.  I intially wanted to have a parent->child relationship between all
> images and galleries, but scrapped the idea because it was ungodly slow.
>
> I could have been trying to access the data incorrectly, but it was 
> definitely
> grabbing all of the images along with the galleries while generating the
> gallery list.  I am currently investigating this, but have no results 
> yet.
> I'll keep you posted.
>
Thanks, I didn't want to be putting words into your mouth on this one...

For reference, how nested is your gallery structure (i.e., what is the 
deepest level)?

 From my initial look at the DataTree driver code, it seems that it 
wasn't really optimized for deeply nested trees...  I say this because 
in order to call the getObjectById() function, you have to call 
getName() which in turn loads the entire tree up from the requested 
object to the root... (the odd thing is, this is done so that you can 
call another function, getId() to convert the name back into an id... 
though I'm not sure if it's the same id or not in order to do the actual 
lookup of the requested object).

Chuck, can you help us out here and let us know how *you* would be doing 
the lookup to return just the galleries and nothing else?  Maybe it's a 
difference of philosophy, but why load something up until it's needed, 
unless you can get the data in the same single call (which isn't the 
case for the getName() call as it calls the dB multiple times just to 
get the name for a given id).

Is there an alternative way to track the relationship than the way it is 
currently being done (through a delimited list stored in a singe 
field)?  What would be the advantages and disadvantages of doing it in 
the alternative way?  I'm not a DBA and don't pretend to be one, but I 
am trying to learn this stuff and what better way than to question the 
way things have been done in the past?

h


More information about the ansel mailing list