[ 
https://issues.apache.org/jira/browse/GUACAMOLE-76?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15427623#comment-15427623
 ] 

Michael Jumper commented on GUACAMOLE-76:
-----------------------------------------

The breadth-first query is happening correctly - the slowness is due to 
getConnectionIdentifiers(), getConnectionGroupIdentifiers(), and 
getSharingProfileIdentifiers() each executing a new query. This is exacerbated 
by virtually each connection having sharing profiles, and probably wasn't 
noticed before due to connection groups not being very commonly used.

Though N objects can be retrieved from the directories in batch, with one 
query, retrieving child objects will result in one query per, thus the classic 
N+1 problem.

> Retrieval of connection group tree too slow
> -------------------------------------------
>
>                 Key: GUACAMOLE-76
>                 URL: https://issues.apache.org/jira/browse/GUACAMOLE-76
>             Project: Guacamole
>          Issue Type: Bug
>          Components: guacamole, guacamole-auth-jdbc
>            Reporter: Michael Jumper
>            Assignee: Michael Jumper
>            Priority: Blocker
>             Fix For: 0.9.10-incubating
>
>         Attachments: tree-too-slow.png
>
>
> With the addition of sharing profiles to the connection group tree query, 
> requests to retrieve the tree take far too long. The connection group tree 
> REST resource is supposed to make an efficient breadth-first search of the 
> tree space, with a very limited number of queries, but this is clearly not 
> happening:
> !tree-too-slow.png|width=100%!
> It may be that the retrieval algorithm of the tree resource is simply 
> incorrect and needs adjusting, but something is odd.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to