newrelic / newrelic-salesforce-exporter

New Relic integration for Salesforce logs.
Apache License 2.0
10 stars 14 forks source link

Feat/optimize csv parsing #24

Closed sdewitt-newrelic closed 5 months ago

sdewitt-newrelic commented 5 months ago

This PR contains many changes to optimize the download and processing of event logs. In particular, requests for CSVs containing event logs are nowstreamed and processed using a generator iterator. In addition, when loading the data into New Relic, logs/events are sent in chunks and gc.collect() is called after each chunk which will attempt to free up memory. gc.collect() is also run after flushing the cache.