better handling for larger files with gridify