Any advise of reducing memory size of XML in JAXB.
XML File Size - 1 MB
Memory used in Heap after Unmarshall in Jaxb - 7 MB
System.out.println("heapFreeSize--->"+Runtime.getRuntime().freeMemory());
JAXBContext jaxbContext = JAXBContext.newInstance(Document.class);
Unmarshaller unmarshallerJaxb = jaxbContext.createUnmarshaller();
Document document = (Document) unmarshallerJaxb.unmarshal(new File("test.xml"));
System.out.println("heapFreeSize--->"+Runtime.getRuntime().freeMemory());
We have around 100 attributes in XSD and all are string. Any better optimization to reduce memory as we have huge volume of multiple xmls.