You are getting this error because of js memory limit.
There is a maxMB setting in serverConf.xml which by default is set to 64MB. So, if you are going to compare multiple lists with a huge number of records, a good idea will be to get the maxMB increased to 512 MB.
If your instance is hosted by Adobe, please reach out to support for getting this done.
You should divide this xml into multiple files and process it in delta mode or change the architecture and check what can you do to import this data in any other way.