Alternatives to QGIS difference tool

Alternatives to QGIS difference tool

I have a very large shapefile of building polygons and a shapefile of the country they reside in (England). The building shapefile was built by merging 94 smaller shapefiles. Both files have the same CRS.

I have been trying to use the difference tool in QGIS to create a country polygon with holes in where the buildings are.

Oddly the tool completes after about an hour and adds the new difference layer but it is blank. I have 12 GB of RAM and 64bit QGIS but still suspect it's a memory/software issue as I tried the exact same worfklow with just a 25 sq km section of the polygons and it was fine.

Can anyone recommend alternative software (or alternative workflows) to try?

Examples: I wondered if I could load it into a PostGIS database and do a spatial query for example? OR if i could create a batch process to calculate the difference for each building file one after another.