[dev] Video and uploadprogress
Duck
duck at obala.net
Fri Aug 31 12:28:06 UTC 2007
On Thursday 30 of August 2007 18:41:28 Chuck Hagenbuch wrote:
> Even after datatree was mostly taken out of the picture? I'd love to
> see it handle that sort of install, so any pointers on where the
> bottlenecks are are welcome...
oky. I loaded 10k galleries and 25k images on my laptop. I started to look at
the sql code first since is often the most problematic part of the api. When
I open the basic gallery list, I see 2 select queries are performed on DT. I
extracted them en performed it in a benchmark script. The first takes 0.0025
sec and the second takes 0.1975 sec. My dedicated app query takes only 0.0011
on the full 75K galleries list. But of course has no joins or permission
checking. Summarizing not taking in consideration Hrode speed compared to an
dedicated application, only the sql queries needed are 180 times slower.
Some ideas that comes in my mind
- move galleries out of DT (less sql work, no joins etc)
- cache shares (all application will benefit)
- cache galleries views (avoid all sql and php processing)
1. query
SELECT c.datatree_id, c.datatree_name FROM horde_datatree c LEFT JOIN
horde_datatree_attributes a1 ON a1.datatree_id = c.datatree_id WHERE
c.group_uid = "horde.groups" AND (a1.attribute_name = "user" AND
a1.attribute_key = "duck") GROUP BY c.datatree_id, c.datatree_name,
c.datatree_order ORDER BY c.datatree_order, c.datatree_name, c.datatree_id
2. query
SELECT c.datatree_id, c.datatree_name FROM horde_datatree c LEFT JOIN
horde_datatree_attributes a1 ON a1.datatree_id = c.datatree_id WHERE
c.group_uid = 'horde.shares.ansel' AND ((a1.attribute_name = 'owner' AND
a1.attribute_value = 'duck') OR (a1.attribute_name = 'perm_users' AND
a1.attribute_key = 'duck' AND a1.attribute_value & 2) OR (a1.attribute_name
= 'perm_creator' AND a1.attribute_value & 2) OR (a1.attribute_name
= 'perm_default' AND a1.attribute_value & 2)) AND datatree_parents = '' GROUP
BY c.datatree_id, c.datatree_name, c.datatree_order ORDER BY
c.datatree_order, c.datatree_name, c.datatree_id LIMIT 0, 9
More information about the dev
mailing list