DylanSYHoh commented on PR #3648: URL: https://github.com/apache/tika/pull/3648#issuecomment-7054540876
> My 🤖 finds these. Let me know what you think? Looks like the bot is right. I’ve pushed fixes for these. > 1. Quadratic join, repeated per cell. ScriptedTextCell.append joins same-tag runs by string concatenation. > - .xls: a shared string can carry 65,535 one-character runs, and toScriptedText re-sorts and re-joins it for every LabelSST cell that references it. > - .xlsx: the run count is unbounded, and the join is also redone per cell. > - A small file can burn CPU before any output limit triggers. Fix: a StringBuilder per run, and merge once per shared string rather than per cell. I didn’t cache per shared string as suggested: with the linear join, rebuilding per cell costs the same as writing the cell out. I also dropped the RK branch, since POI converts RK records to NumberRecords anyway. Thanks for running it! -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
