[dev] ansel performance (was "category performance")
Ben Chavet
ben at chavet.net
Fri Dec 12 11:37:43 PST 2003
After doing a bit more digging, I think I've figured out why my ansel
performance is so poor. I have 2200 images in 65 galleries, and when the
gallery list is retrieved, *all* of the attributes for *all* of the images in
*all* of the accessible galleries are returned, not just the gallery info that
we need. This results in about 11,000 rows coming out of my database, which
isn't a small feat. The problem is that we store all of the image info in the
gallery attributes. While this works, it's not very scalable. So, here is my
proposal:
We make each image be a category with its own attributes and use the category
heirarchy to keep track of where each image belongs. Images can extend the
Category class, and galleries can continue to extend the Share class. We can
allow galleries to have children -- either more galleries or images -- and not
allow images to have children. Though, I can think of some situations where it
would be benificial to allow images to have children.
I think this structure will greatly improve performance. Unfortunately, this
change would mean a pretty major structural change for ansel, and it probably
couldn't come at a worse time as we are discussing the release schedule for
different modules (including ansel). Maybe we could release ansel as-is for
this round, and make the changes for the next release.
I am willing to do most of the work, but I'd like to get some feedback so I can
lay out my plan of attack before I start. Let me know what you think.
--Ben
Quoting Ben Chavet <ben at chavet.net>:
> Ok, I'm trying to wrap my brain around how the whole category system works.
> What I'd really like to figure out, is why when there are about 50 galleries
> in
> ansel, it takes *forever* for my server to display them. I think I've traced
> it down to Category_sql::getCategoryAttributes($cid), but I don't really see
> any way to make it any faster. It appears to be line 677 that is making
> things
> slow, but that's a database query...gotta have that. Of course, I could be
> way
> off here.
>
> I reallize that I don't have a very fast server, but I would hope it could
> get
> acceptable performance from 50 galleries. It takes about 30 seconds for it
> to
> even start sending the page.
>
> If anybody has any good ideas on how to make the categories faster (in
> particular, getting a list of shares), please speak up!
>
> Thanks,
> Ben
>
> ----------------------------------------------------------------
> This message was sent using IMP, the Internet Messaging Program.
>
> --
> Horde developers mailing list
> Frequently Asked Questions: http://horde.org/faq/
> To unsubscribe, mail: dev-unsubscribe at lists.horde.org
>
----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.
More information about the dev
mailing list