Bug 138248 - Search in autofilter and then click OK is very slow for the filtered results to show up
Summary: Search in autofilter and then click OK is very slow for the filtered results ...
Status: RESOLVED DUPLICATE of bug 133878
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: perf
Depends on:
Blocks:
 
Reported: 2020-11-16 00:35 UTC by Kevin Suo
Modified: 2020-11-16 01:29 UTC (History)
0 users

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kevin Suo 2020-11-16 00:35:00 UTC
This is a separation of Bug 122419. While Caolán's patch in that bug seems to have fixed the slowness when typing a char in the search box, it does not fix the slowness when typing a char in the search box *and then click "OK"* (i.e., the actual filter process).

Steps to reproduce:

1. Type "1" in column A of attachment 167089 [details]. 
(it may be slow for the search result to show up if your build have not yet applied the patch in bug 122419).

2. Click OK.

Expected Result: 
It should be fast for the filtered results to show up.

Current Result:
Very slow. For me, type "1" then click OK would make the system freeze.

Actually the slowness can already be observed with a debug build when you do the seach and click OK in column B where it contains only a few unique values.
Comment 1 Kevin Suo 2020-11-16 00:47:06 UTC
Copying Caolan's comment:

"It looks to me that it loops over every cell in the column and compares each cell to every selected option in the ui list by looping over every one of those. My guess is that for this specific case where we want to see if each cell has a match in the list that we should do something like special case the search by lowercasing all the entries in the list and putting into a sorted_vector so we can look up directly if the lowercase text in each cell has a matching entry in that list".
Comment 2 Kevin Suo 2020-11-16 00:54:29 UTC
Oh I think we already have a diplucated report on this issue...

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