On Sun, 2014-08-17 at 19:35 +0000, Evan Dandrea wrote:
> > +
> > + /* Remove entries that we don't want to send */
>
> I'm curious to know your motivation for this approach. Why load everything into memory and prune out the keys we don't want rather than avoiding adding them to the hash table in the first place?
Started going that route, but the problem was that because of multi-line
entries we don't know the length of the item until we process the next
key, so it started to get tricky and feel "clever." Opted for the
simpler code, which allowed for taking out the ignore_key field as well,
simplifying the loop. It seems like, for the most part, the largest
fields of the crash file are the ones we want anyway (coredump, stack
trace, etc.) so the cost wasn't that high.
On Sun, 2014-08-17 at 19:35 +0000, Evan Dandrea wrote:
> > +
> > + /* Remove entries that we don't want to send */
>
> I'm curious to know your motivation for this approach. Why load everything into memory and prune out the keys we don't want rather than avoiding adding them to the hash table in the first place?
Started going that route, but the problem was that because of multi-line
entries we don't know the length of the item until we process the next
key, so it started to get tricky and feel "clever." Opted for the
simpler code, which allowed for taking out the ignore_key field as well,
simplifying the loop. It seems like, for the most part, the largest
fields of the crash file are the ones we want anyway (coredump, stack
trace, etc.) so the cost wasn't that high.