To_xml using lots of memory

to_xml uses up huge amounts of memory. Whether I use to_xml on an
activerecord object directly, or create a hash from the activerecord
object and then call to_xml on the hash, creating a 1.6mb xml file
eats up 50mb of ram in rails.