@property<EOL><INDENT>def mem_size(self):<DEDENT>
data_len = self._data_mem_size<EOL>node_count = len(list(self.xml_doc.iter(tag=etree.Element)))<EOL>if self.compressed:<EOL><INDENT>size = <NUM_LIT> * node_count + data_len + <NUM_LIT><EOL><DEDENT>else:<EOL><INDENT>tags_len = <NUM_LIT:0><EOL>for e in self.xml_doc.iter(tag=etree.Element):<EOL><INDENT>e_len = max(len(e.tag), <NUM_LIT:8>)<EOL>e_len = (e_len + <NUM_LIT:3>) & ~<NUM_LIT:3><EOL>tags_len += e_len<EOL><DEDENT>size = <NUM_LIT> * node_count + data_len + <NUM_LIT> + tags_len<EOL><DEDENT>return (size + <NUM_LIT:8>) & ~<NUM_LIT:7><EOL>
used when allocating memory ingame