Use pickle instead of JSON, store runtime args and additional docs on a per-batch basis rather than per-doc.