BUFR decode performance: Operator 203YYY: override table keeps growing
@@ -310,6 +310,16 @@ static void tableB_override_clear(grib_context* c, grib_accessor_bufr_data_array
}
self->tableb_override=NULL;
}
+static void tableB_override_dump(grib_accessor_bufr_data_array *self)
+{
+ bufr_tableb_override* p = self->tableb_override;
+ int i = 1;
+ while (p) {
+ printf("ECCODES DEBUG: Table B Override: [%d] code=%d, rv=%ld\n", i, p->code, p->new_ref_val);
+ p = p->next;
+ ++i;
+ }
+}
static void init(grib_accessor* a,const long v, grib_arguments* params)
{
@@ -2503,6 +2513,7 @@ static int process_elements(grib_accessor* a,int flag,long onlySubset,long start
if (descriptors[i]->Y == 255) {
grib_context_log(c, GRIB_LOG_DEBUG,"Operator 203YYY: Y=255, definition of new reference values is concluded");
self->change_ref_value_operand = 255;
+ if (c->debug == -1) tableB_override_dump(self);
} else if (descriptors[i]->Y == 0) {
grib_context_log(c, GRIB_LOG_DEBUG,"Operator 203YYY: Y=0, clearing override of table B");
tableB_override_clear(c, self);
@@ -2510,6 +2521,7 @@ static int process_elements(grib_accessor* a,int flag,long onlySubset,long start
} else {
grib_context_log(c, GRIB_LOG_DEBUG,"Operator 203YYY: Definition phase: Num bits=%d",descriptors[i]->Y);
self->change_ref_value_operand = descriptors[i]->Y;
+ tableB_override_clear(c, self);
}
/*grib_iarray_push(elementsDescriptorsIndex,i);*/
if (decoding) push_zero_element(self,dval);
