Bug 124450 - Libreoffice Calc: Autofilter functions are slow
Summary: Libreoffice Calc: Autofilter functions are slow
Status: RESOLVED DUPLICATE of bug 76481
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
(earliest affected) release
Hardware: All All
: medium normal
Assignee: Not Assigned
Keywords: filter:xls, perf
Depends on:
Blocks: AutoFilter XLS
  Show dependency treegraph
Reported: 2019-03-30 21:04 UTC by Juhani Suhonen
Modified: 2020-03-22 14:06 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:

Just try to open Autofilter dropdown (10.58 MB, application/vnd.ms-excel.sheet.macroEnabled.12)
2019-03-30 21:07 UTC, Juhani Suhonen
Saved ODS (2.86 MB, application/vnd.oasis.opendocument.spreadsheet)
2019-03-30 22:50 UTC, Roman Kuznetsov
memory autofilter filter (50.61 KB, image/png)
2019-03-31 07:05 UTC, Oliver Brinzing

Note You need to log in before you can comment on or make changes to this bug.
Description Juhani Suhonen 2019-03-30 21:04:46 UTC
Autofilter functions are really slow with large (>100.000 entries) lists. This makes autofilters practically unusable. Improving sorting algorithm would significantly speed up autofilters.

Steps to Reproduce:
1.Create spreadsheet with >100.000 lines
2.Apply Autofilter to first row
3.Try to open Autofilter dropdown menu -> Calc freezes for >60 seconds

Actual Results:
happens 100% of the time, regardless of OS and HW

Expected Results:
Eventually calc will resume, but slowness makes it unusable

Reproducible: Always

User Profile Reset: Yes

Additional Info:
Simple sorting algorithm would speed up opening autofilters by factor of 1000.
Comment 1 Juhani Suhonen 2019-03-30 21:07:15 UTC
Created attachment 150417 [details]
Just try to open Autofilter dropdown
Comment 2 Roman Kuznetsov 2019-03-30 22:48:40 UTC
confirm in

Version: (x64)
Build ID: 5cb2db6dd7d234a610a6501668a9901af8472b7f
CPU threads: 4; OS: Windows 10.0; UI render: default; VCL: win; 
TinderBox: Win-x86_64@42, Branch:master, Time: 2019-03-26_23:06:31
Locale: ru-RU (ru_RU); UI-Language: en-US
Calc: threaded

after saving xlsm to ods and reopen ods in LO the problem still here

In Excel 2016 autofilter works very fast with file from attach
Comment 3 Roman Kuznetsov 2019-03-30 22:50:02 UTC
Created attachment 150418 [details]
Saved ODS
Comment 4 Oliver Brinzing 2019-03-31 07:05:00 UTC
Created attachment 150420 [details]
memory autofilter filter
Comment 5 Oliver Brinzing 2019-03-31 07:15:22 UTC
(In reply to Juhani Suhonen from comment #0)
> Eventually calc will resume, but slowness makes it unusable

yes, calc will come back

this issue is a bug, already reproducible with LO

looks similar to:
Bug 124080 - System freezes after search using autofilter

btw: memory goes up from 600mb (after loading) to ~1,2gb
Comment 6 Juhani Suhonen 2019-03-31 13:36:23 UTC
Yes, the memory consumption is expected (because the file contains nearly 1 million lines and Calc does not support memory mapped files [YET!]).

However, the slowness of opening autofilter dropdown is easily fixable (read complete section to the buffer and merge sort, which is O(n log n)). Current method seems to be 2^(O(n)) :-\

Comment 7 Gabor Kelemen (allotropia) 2019-04-04 13:27:50 UTC
This looks like a duplicate to bug #76481
Comment 8 V Stuart Foote 2020-03-22 13:59:54 UTC

*** This bug has been marked as a duplicate of bug 76481 ***