change Diligent API to minimize heap usage