Reduce libxmljs memory leaks