Directory Studio
  1. Directory Studio
  2. DIRSTUDIO-120

100% CPU when deleting thousands of entries

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.8.0, 0.8.1
    • Fix Version/s: 1.1.0
    • Component/s: studio-ldapbrowser
    • Labels:
      None

      Description

      When we try to delete 1000 entries, the CPU goes up to 100% for several minutes.

        Activity

        Hide
        Stefan Seelmann added a comment -

        The deletion of entries is implemented very ineffectively in a pessemistic way: Before delting an entry a one-level search is performed to find out if there are child entries. This is done recursively. Not until an entry doesn't have any child entries the entry itself it removed. So when deleting an ou with thousands of child entries there are thousands of searches for each child entry.

        We should reimplement it more optimistic:

        • use the tree delete control if supported by the server
        • else try to delete the entry. If receiving an error code 66 (notAllowedOnNonLeaf) then perform a one-level search and try to delete these entries.

        This is a bigger change, lets postpone this issue and reimplement it together with DIRSTUDIO-123.

        Show
        Stefan Seelmann added a comment - The deletion of entries is implemented very ineffectively in a pessemistic way: Before delting an entry a one-level search is performed to find out if there are child entries. This is done recursively. Not until an entry doesn't have any child entries the entry itself it removed. So when deleting an ou with thousands of child entries there are thousands of searches for each child entry. We should reimplement it more optimistic: use the tree delete control if supported by the server else try to delete the entry. If receiving an error code 66 (notAllowedOnNonLeaf) then perform a one-level search and try to delete these entries. This is a bigger change, lets postpone this issue and reimplement it together with DIRSTUDIO-123 .
        Hide
        Stefan Seelmann added a comment -

        Fixed in several commits.

        Show
        Stefan Seelmann added a comment - Fixed in several commits.

          People

          • Assignee:
            Stefan Seelmann
            Reporter:
            Emmanuel Lecharny
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development