Memory use stays flat whatever the size of the file, so a 1 GB document validates on an ordinary laptop.
Rules that compare distant parts of the document need the whole document in memory.