Memory optimization of ElkDatatypeHandler