Last modified: 2014-10-21 02:04:47 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T61172, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 59172 - Search suggestions cause performance hit on slower machines
Search suggestions cause performance hit on slower machines
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Search (Other open bugs)
1.23.0
All All
: High normal (vote)
: 1.23.0 release
Assigned To: Bartosz Dziewoński
: javascript, performance
Depends on:
Blocks: 27411
  Show dependency treegraph
 
Reported: 2013-12-31 22:18 UTC by Connor Behan
Modified: 2014-10-21 02:04 UTC (History)
7 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
What the change really means (30.47 KB, image/png)
2014-04-10 17:44 UTC, Thiemo Mättig
Details

Description Connor Behan 2013-12-31 22:18:03 UTC
A machine that I frequently use to edit Wikipedia is 900MHz (not 1GHz as I originally thought). Slow by today's standards but it should be fine for using a search engine. When suggestions are enabled (as they always are after bug 52812) the delay between typing a letter and having it show up in the text box is no longer imperceptible. This has to do with the "computation" not the "display", i.e. it happens when I hide them with

.suggestions {display:none !important;}

Suggestions on Google and YouTube cause the same delay so it might not be possible to fix this and keep the feature mandatory.

Something else that I've only seen on slower machines is trouble with holding down the backspace key. This used to erase a search perfectly. Since bug 52812, the search string will only disappear when you release the key. This does not happen on Google so it should be fixable.
Comment 1 MZMcBride 2014-01-01 21:50:23 UTC
In order to resolve this bug, we may need more info. In particular, operating system and version, Web browser and version, etc.
Comment 2 Connor Behan 2014-01-02 07:08:25 UTC
That would be Archlinux with kernel 3.12 and chromium 31.0.1650.63. On firefox 26.0 it's slower still but that's because the whole browser is made of JS.
Comment 3 Bartosz Dziewoński 2014-02-04 11:37:30 UTC
This could be caused by the jquery.autoEllipsis module doing some really weird stuff to determine if the text is too long to fix in the box, and doing it wrong anyway (bug 30309). Maybe we could just use text-overflow: ellipsis.
Comment 4 Gerrit Notification Bot 2014-02-04 12:50:11 UTC
Change 111180 had a related patch set uploaded by Bartosz Dziewoński:
jquery.suggestions, mediawiki.searchSuggest: Don't use jquery.autoEllipsis

https://gerrit.wikimedia.org/r/111180
Comment 5 Gerrit Notification Bot 2014-04-07 19:00:08 UTC
Change 111180 merged by jenkins-bot:
jquery.suggestions, mediawiki.searchSuggest: Don't use jquery.autoEllipsis

https://gerrit.wikimedia.org/r/111180
Comment 6 Bartosz Dziewoński 2014-04-07 19:10:21 UTC
Connor, can you check if the patch above helped?

It's not yet live on Wikipedias, but I deployed it on my testing wiki, feel free to play with it however you need: http://users.v-lo.krakow.pl/~matmarex/testwiki/ (use user: testwiki, password: testwiki to access the site, it's a very simple antispam measure).
Comment 7 Connor Behan 2014-04-07 20:23:46 UTC
On the testwiki, I do not notice a time delay with fast typing anymore. There still is a time delay of 1-2 seconds when I hold backspace to erase what was typed.
Comment 8 Gerrit Notification Bot 2014-04-09 12:09:41 UTC
Change 124827 had a related patch set uploaded by Bartosz Dziewoński:
jquery.suggestions: Debounce calls to $.suggestions.special

https://gerrit.wikimedia.org/r/124827
Comment 9 Bartosz Dziewoński 2014-04-09 12:10:04 UTC
Yay. Let's try another thing for the backspacing, but this is a bit of a long shot – if this patch doesn't help, then I don't know what could. I deployed this to my test wiki as well.
Comment 10 Thiemo Mättig 2014-04-10 17:44:49 UTC
Created attachment 15073 [details]
What the change really means

To illustrate what the change really means:

1: This is what you see when you type "exa" in the search box in the German Wikipedia.

2: Add an "a" and watch very carefully what happens. The line at the bottom immediately changes along with what you type. But you need to be very fast, this is only visible for 120ms.

3: 120ms later you will see this.

In my opinion the current real-time update adds no benefit. It's kind of nice to have the line updated very fast but you can barely make use of this advantage. You are not that fast with your mouse. You have to wait for the search anyway because the number of search results may change (as it does in my example).
Comment 11 Gerrit Notification Bot 2014-04-10 23:17:23 UTC
Change 124827 merged by jenkins-bot:
jquery.suggestions: Debounce calls to $.suggestions.special

https://gerrit.wikimedia.org/r/124827
Comment 12 Bartosz Dziewoński 2014-04-11 20:45:46 UTC
I'm going to assume this fixed the second issue as well, because if it didn't then I have no idea what to do ;)

Connor, I'd love if you could verify this fix as well. Thanks!
Comment 13 Connor Behan 2014-04-11 22:36:14 UTC
Since you mentioned the second issue (backspace), I have been trying to test it but the testwiki gives a server error. I hope you can get it back online.
Comment 14 Bartosz Dziewoński 2014-04-11 22:46:25 UTC
Yah, I just noticed :/ Thankfully the code should be deployed on the labs beta cluster, e.g. http://en.wikipedia.beta.wmflabs.org/wiki/Main_Page – you can test there as well.
Comment 15 Connor Behan 2014-04-11 23:37:28 UTC
The backspace issue is still there on the beta wiki, sorry.
Comment 16 Bartosz Dziewoński 2014-04-17 19:53:09 UTC
I can't reproduce the backspace thingy; I suspect doesn't affect all browsers?

I'm going to close this bug to clear things up, especially as we managed to resolve the more visible issue here. Please create another one if you want to follow this up (you can use the "Clone This Bug" link at the bottom and just adjust the description if you're lazy :) ).

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links