ExecuteQueryHandler now measures the length of data before writing it, so it can write in one go instead of writing to one list and then writing that list to a buffer. For larger packets this should be more efficient. Eventually it would be nice if the values could be written to the socket directly, instead of via a buffer.