Open keyurpd opened 4 years ago
Would appreciate some response. As I believe, the XBRL defined structure is playing a big part in compounding the problem.
Stay safe!
Hi @keyurpd - apologies for the delay in responding. It seems like you can reduce the time spent processing by first indexing the contexts in the filing. By leveraging this attribute, you'll reduce the number of string comparisons significantly.
It would be great to learn more about how you're using the WIP taxonomy - email david.tauriello @ xbrl.us with a few dates and times when you have 30 min to help my team understand the work you're doing and its goals.
Thanks @davidtauriello
This is how we are doing it currently. Only the item in italic is the biggest bottleneck though.
Overall the above approach is acceptable when the Contracts are in few hundreds. But when it reaches in thousands, it does sometimes, it becomes painfully slow. I believe, the free-style structure is playing a very big part in contributing to the slowness.
One alternative design could be hierarchical groups...
<row>
<column>
<column>
</row>
<row>
<column>
<column>
</row>
I was trying parsing large xml files with thousands of contracts. And it's very slow obviously.
I have a feeling the structure/xsd allows a single contract details to be present theoretically anywhere within the file. Then there are two context strings for a single contract/axis. So you have to do a double string comparison for attributes within the entire file.
1000 contracts = 1000 axis = 2000 contexts = 15000 elements (Assuming 15 columns/contract) = (2000 x 15000) string comparisons!
Is there a way to speed up the processing?