That whole implementation will have to be reworked, it does far two many different LDAP requests. 
Far better to do a "getAllCategories". 
It is not mandatory for beta (since it's optimization), but we can't let it like that for the final release of that feature.