ion-python icon indicating copy to clipboard operation
ion-python copied to clipboard

Investigate poor performance with large symbol table import max IDs

Open tgregg opened this issue 8 years ago • 0 comments

The text reader's performance degrades or hangs when faced with imports with huge max IDs. For example (taken from good/subfieldVarUInt32bit.ion):

$ion_1_0

// 5 bytes
// 31 bits
// hex: 0x7fffffff
// dec: 2147483647
$ion_1_0
$ion_symbol_table::{
    imports:[ { name: "com.amazon.blah.blah.blah",
                version: 1,
                max_id: 2147483636 // 2147483646 - 1 - 9 (system symbols)
              } ],
    symbols:[ "boundary-1",
              "boundary",
              "boundary+1"
            ]
}
'boundary-1'::1         // $2147483646
'boundary'  ::1         // $2147483647 2^31 - 1
'boundary+1'::1         // $2147483648

This should be fixed. Successful resolution of this issue will involve removal of the following files from the test_vectors.py skip list: subfieldVarUInt.ion subfieldVarUInt32bit.ion

tgregg avatar Jan 20 '17 23:01 tgregg