Just zip the file, not the directory too.
Fix sorting.
Allow lists/tuples to stand for OR.
Make aggregate computation faster by using JOINs.