[darcs-users] GSoC: network optimisation vs cache vs library?

Lele Gaifax lele at nautilus.homeip.net
Wed Apr 21 08:20:22 UTC 2010


On Sun, 18 Apr 2010 20:56:17 -0600
"Zooko O'Whielacronx" <zookog at gmail.com> wrote:

> Well I don't think that is causing any problems for us. The timings on
> the sql queries are always less than a few milliseconds. Here are some
> of the diagnostic outputs:
> 
> 2010-04-18 19:40:43,073 Trac[dbutil] DEBUG: SELECT dnc.node_id,
> dnc.rev, dnc.path, dnc.parent_id
>            FROM darcs_node_changes AS dnc
>            WHERE dnc.repo_id = ''
>              AND dnc.rev = (SELECT max(dnc2.rev)
>                             FROM darcs_node_changes AS dnc2,
> darcs_nodes AS dn WHERE dnc2.repo_id = dnc.repo_id
>                               AND dnc2.node_id = dnc.node_id
>                               AND dn.repo_id = dnc2.repo_id
>                               AND dn.node_id = dnc2.node_id
>                               AND dnc2.rev <= 5883 AND ((dn.remove_rev
> IS NULL)       OR (dn.remove_rev > 5883))) AND dnc.parent_id = 306: 1
> executions in 477 millisecs, fastest run 477 millisecs, slowe
> st 477 millisecs, average 477 millisecs
> 
> Oh, except hold up, what's this?
> 
> 2010-01-18 19:28:24,565 Trac[dbutil] DEBUG: SELECT dnc.node_id,
> dnc.rev, dnc.path, dnc.parent_id
>            FROM darcs_node_changes AS dnc
>            WHERE dnc.repo_id = ''
>              AND dnc.rev = (SELECT max(dnc2.rev)
>                             FROM darcs_node_changes AS dnc2,
> darcs_nodes AS dn WHERE dnc2.repo_id = dnc.repo_id
>                               AND dnc2.node_id = dnc.node_id
>                               AND dn.repo_id = dnc2.repo_id
>                               AND dn.node_id = dnc2.node_id
>                               AND dnc2.rev <= 7926 AND ((dn.remove_rev
> IS NULL)       OR (dn.remove_rev > 7926))) AND dnc.parent_id IS NULL:
> 1 executions in 5.67 seconds, fastest run 5.67 seconds, slowest 5.67
> seconds, average 5.67 seconds
> 
> Here's a sql query that took 5.67 seconds. I have no idea what it is
> doing, though. There aren't anywhere near 7000 patches in the
> tahoe-lafs repository. Lele: do you know what this is and if it is a
> real performance issue?

I'd like to investigate further on this! I thought I already optimized
that particular query, even adding an index... Are you sure you are
running latest rev of trac-darcs?

ciao, lele.
-- 
nickname: Lele Gaifax    | Quando vivrò di quello che ho pensato ieri
real: Emanuele Gaifas    | comincerò ad aver paura di chi mi copia.
lele at nautilus.homeip.net |                 -- Fortunato Depero, 1929.


More information about the darcs-users mailing list