set debug to False to see what happens to memory usage/speed
rearrage toptags command to try to reduce memory usage