1st attempt to introduce batching logic to prevent ui from locking up when processing large numbers of rows.