OdfSpreadsheetDocument: getTables and getTableList
I tried to get a list of all the spreadsheet sheets on a 250k ods using OdfDocument::getTableList() and stopped the process after minutes of full cpu usage.
OdfDocument::getTableList() is using OdfSchemaDocument::getTables() is using fillTableList which is going recursively through all the XML.However, the comment above fillTableList says: "Only tables being on root level are being considered" which is not what fillTableList does.
According to the old "simple" API source and according to OdfDocument::getTableByName only the root level needs to be searched for ODS-Tables, so the comment seems correct. However, I did not look into the specification of ODS and do not know about other document formats and whether they need this method recursively.
I suggest to consider removing the recursive call from fillTableList or document it as a false-friend and create a new one for a list of ODS tables on root level.
We should drop the old "simple" API source due to duplication - join/fork/rejoin/abundance of IBM from this project - and take over - copy parts of value - to our latest sources. Could you please try this functionality from the latest master branch?
If not available as you need it please copy (from Simple)/add it to the master in a pull request. To keep the master stable please add tests for your functionality - best you modify exiting ones. As we should provide automated tests for all features we like to depend on ;-)
Thanks in advance for any help that you are able to provide! Svante
I am a bit confused, as I tried the 1.0.0-BETA1 maven package which, according to documentation, should have been cleaned from the "simple" stuff and does not mark the stuff as Deprecated. Furthermore, I am using the namespace org.odftoolkit.odfdom.* seemingly from the "new" API.
Obviously we were cross-talking. As you did not mention the release or branch you are working on, but mentioned the "old" Simple API source, I was assuming your work was based on such. In addition, I have double-checked the BETA1 release, there is no Simple API folder accidentally included: https://github.com/tdf/odftoolkit/releases Confusion solved (partly - at least from my side) :-)
What I meant to say, I agree with the improvement of the Table handling as you suggested on the master branch and not on the Simple API deprecated source. I - and likely others - are willing to review your work if you have any suggestion to make as a pull request. Does this solve your confusion as well? ;-)
Cheers, Svante
PS: I will be travelling today and likely not be able to respond until tomorrow afternoon...