(bug 64186) Decrease exhausing memory usage, speed up processing

- delete local list after we are done with it
- decrease processing speed: list.remove() consumes a lot of time
  because lists are not indexed and removing an item  needs to
  search inside the sequence. There is an easy way for more speed
  when the parent category is just skipped inside the loop. This
  decreases time consumtion by 65% for depth:3

Change-Id: I067c2a0c95e86fa7367d6a3795962ec31fd5208c