Closed WilianZilv closed 10 months ago
What performance improvements do you expect for small and very large JSON arrays? Note that every time you call ReDim Preserve the entire array is copied to a new array.
There are some backward-compatibility issues:
- Collections have first element (1). Arrays have first element (0). This could be fixed in the ReDim statement.
- Existing code may be using the Count/Add/Remove methods which are not available for Arrays.
- Existing code may be using Typename/Vartype methods to navigate (and verify) the data structure.
So your ParseArray should be available as a non-default compilation option.
Note that no maintenance is being done on this repo. Don't hold your breath for the PR.
Actually, i forgot to explain what i mean by performance. I dont think the change by itself benefits the parser.
I did this change because i'm using json to write data in the sheet, to do that i need to convert the Collection to an array, which is too slow (i was testing with 100k values), with Collections it can take 1+ minutes, with arrays the conversion to the structure i need is much less expensive, resulting in less than a second to do so.
What performance improvements do you expect for small and very large JSON arrays? Note that every time you call ReDim Preserve the entire array is copied to a new array.
There are some backward-compatibility issues:
So your ParseArray should be available as a non-default compilation option.
Note that no maintenance is being done on this repo. Don't hold your breath for the PR.