mirror of
https://github.com/open-webui/open-webui.git
synced 2026-11-14 09:21:22 +00:00
fix: large spreadsheet upload takes minutes and stalls the server (#33770)
Uploading a big, sparsely filled .xlsx sent the document parser into a very slow table-detection step; a 28,000-row sheet took around 13 minutes, long enough for health checks to fail and pods to be restarted. Spreadsheets are now read as a whole sheet without that step, which took a 2,500-row sheet from 17.6 s to about 1 s with identical text. Sheets that hold several separate tables on one sheet now come out as one block instead of one block per table. Fixes #33768
This commit is contained in:
parent
bc14c37670
commit
e9cb194f46
1 changed files with 2 additions and 1 deletions
|
|
@ -785,7 +785,8 @@ class Loader:
|
|||
'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
|
||||
] or file_ext in ['xls', 'xlsx']:
|
||||
try:
|
||||
loader = UnstructuredLoader(file_path, 'xlsx')
|
||||
# Subtable detection is very slow on large sparse sheets.
|
||||
loader = UnstructuredLoader(file_path, 'xlsx', find_subtable=False)
|
||||
except ImportError:
|
||||
log.warning(
|
||||
"The 'unstructured' package is not installed. "
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue