> Hi,
>
> I propose the following change in executeRequest in PropFindMethod.java:
>
> ...
>                    if (depth > 0) // proposed change
>                    {
>                       // existing code
>                      Enumeration enum = null;
>
>                      try {
>                          enum = structure.getChildren(slideToken, cur);
>                      } catch (StructureException e) {
>                          e.printStackTrace();
>
> resp.setStatus(WebdavStatus.SC_INTERNAL_SERVER_ERROR);
>                          throw new WebdavException
>                              (WebdavStatus.SC_INTERNAL_SERVER_ERROR);
>                      } catch (ServiceAccessException e) {
>                          e.printStackTrace();
>
> resp.setStatus(WebdavStatus.SC_INTERNAL_SERVER_ERROR);
>                          throw new WebdavException
>                              (WebdavStatus.SC_INTERNAL_SERVER_ERROR);
>                      }
>
>                      while (enum.hasMoreElements()) {
>                          stackBelow.push(enum.nextElement());
>                      }
>                    }
> ...
>
> While the child information of the leaves is not used, there is no need
> to query it. Please correct me if I am wrong.
> In my case the number of queries to be executed on the database reduces
> dramatically.

Yes you're right, since getChildren will actually retrieve all child objects
(even if it's useless), which will would be roughly equivalent to increasing
the propfind depth by one (very bad). That should dramatically improve
performance in a lot of situations.

Remy

Reply via email to