Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Excerpt
hiddentrue

When we set the "unpack" key to decode the data section, for every Table B element key we create a set of attributes. So for example examine the output from "bufr_dump -jf" and you see meta-data attributes like

BUFR: Performance improvement by skipping some keys

Step-by-step guide

When we set the "unpack" key to decode the data section, for every Table B element key we create a set of attributes. So for example examine the output from "bufr_dump -jf" and you see meta-data attributes like:

Code Block
"key" : "cloudCoverTotal",

...


"units" : "%",

...


"scale" : 0,

...


"reference" : 0,

...


"width" : 7

So in this case as well as having the key "cloudCoverTotal", you will also have "cloudCoverTotal->units" and "cloudCoverTotal->scale" etc.

In fact the cost of creating these extra keys is quite high so it would be advantageous for the users who do not care about these keys to omit them altogether.  This can be done

...

by setting the key:

Code Block
skipExtraKeyAttributes


Note

Note: This must be done BEFORE calling unpack e.g.

Code Block
codes_set(msgid, 'skipExtraKeyAttributes', 1)

...


codes_set(msgid, 'unpack', 1)


Now decoding will be on average 25% faster as fewer keys are created/destroyed. Note: This does not affect attributes like percentConfidence and associatedFieldSignificance. Their keys will be created if present in the message.

Setting this key will also speed up encoding: Set it to 1 before setting the "unexpandedDescriptors".

Content by Label
showLabelsfalse
max5
spaces~usa
showSpacefalse
sortmodified
reversetrue
typepage
cqllabel = in ("kb-how-to-article","eccbufr-faqs","bufr","encode","decode","performance","speed","optimisation") and type = "page" and space = "~usaUDOC"
labelskb-how-to-article