# limiting size of	obspy.core.trace.Trace.stats.processing

**URL:** https://discourse.obspy.org/t/limiting-size-of-obspy-core-trace-trace-stats-processing/453
**Category:** Users Mailing List Archive
**Tags:** archive
**Created:** [October 14, 2015, 12:42pm UTC](https://discourse.obspy.org/t/limiting-size-of-obspy-core-trace-trace-stats-processing/453 "2015-10-14T12:42:25Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Peter\_Schmidt](https://discourse.obspy.org/letter_avatar_proxy/v4/letter/p/5e9695/32.png) [@Peter\_Schmidt](https://discourse.obspy.org/u/Peter_Schmidt)
#### Post date: [October 14, 2015, 12:42pm UTC](https://discourse.obspy.org/t/limiting-size-of-obspy-core-trace-trace-stats-processing/453/1 "2015-10-14T12:42:25Z")

</div>

Hi All

**Q:** Is it possible to limit the size of the list used by obspy.core.trace.Trace.stats.processing

**Background:**  
I’m working on a utility that will listen to seedlink streams temporarily storing the data in a ringbuffer. The ringbuffer is currently implemented using merge() and trim() methods of the obspy.core.stream.Stream class.

However each use of trim() adds an entry to obspy.core.trace.Trace.stats.processing so with time this list stands to grow large unless limited in size. Currently my workaround is to pop that last element of the list after each usage of the trim() method, but perhaps there’s a better way to handle this.

regP

---

<div class="post-metadata">

### Author: ![LionKrischer](https://discourse.obspy.org/user_avatar/discourse.obspy.org/lionkrischer/32/219_2.png) [@LionKrischer](https://discourse.obspy.org/u/LionKrischer)
#### Post date: [October 14, 2015, 12:54pm UTC](https://discourse.obspy.org/t/limiting-size-of-obspy-core-trace-trace-stats-processing/453/2 "2015-10-14T12:54:53Z")

</div>

Hi Peter,

this is really an edge use case thus we are unlikely to implement something along these lines in ObsPy core. One really has to process for a very very long time until that list grows large enough to be an annoyance on modern computers.

Just clearing the list once in a while is probably the simplest solution. You could always monkey patch the method that adds the processing information or replace the list with a some queue data structure but both are probably not worth the effort.

Cheers!

Lion

---

<div class="post-metadata">

### Author: ![Peter\_Schmidt](https://discourse.obspy.org/letter_avatar_proxy/v4/letter/p/5e9695/32.png) [@Peter\_Schmidt](https://discourse.obspy.org/u/Peter_Schmidt)
#### Post date: [October 14, 2015, 12:57pm UTC](https://discourse.obspy.org/t/limiting-size-of-obspy-core-trace-trace-stats-processing/453/3 "2015-10-14T12:57:34Z")

</div>

Ok,

I guess my workaround will do then, and the post here can serve as a source of information if anyone else stumbles across this

regP
