Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Very slow responsive when type search term #265

Closed
dontdieych opened this issue Feb 1, 2015 · 25 comments
Closed

Very slow responsive when type search term #265

dontdieych opened this issue Feb 1, 2015 · 25 comments

Comments

@dontdieych
Copy link

I'm wondering about it is only me or ...

When I type keyword, say browser location bar, it feels like this,

search keyword

but when I type on zeal,

s ... e ... a ... r ... c ...

during '...', zeal freeze. 1sec ~ 2sec. Don't respond at all. If I continue to type ignoring freeze , then all input are randomly mixed.

srchae ekyod

like that.

Do you all fine?

@trollixx
Copy link
Member

trollixx commented Feb 1, 2015

Please, provide Zeal version you use, operating system and a list of docsets installed, so I'd be able to reproduce your problem.

@dontdieych
Copy link
Author

Sorry, I'd missed.

Archlinux

linux 3.18.4-1
xmonad 0.11-10
xorg-server 1.16.3-2
zeal-git 0.0.0.556.09840e8-1
libarchive 3.1.2-8
qt5-webkit 5.4.0-3

@jkozera
Copy link
Member

jkozera commented Feb 2, 2015

@dontdieych please also share your list of installed docsets. Do you use many of them or any specific ones that might cause the problem? Maybe post a screenshot of your docset list.

@dontdieych
Copy link
Author

I've tried only with bash docsets installed. Try these search terms.

eval - ok
break - ok
shift - not ok. it almost typed like'sifht'. If I type slowly, it's ok.

@dontdieych
Copy link
Author

I tried again. 'eval' and 'break' also mangled when I type more fast.

@dontdieych
Copy link
Author

Try 'shi'. It always typed as 'sih' except only typed slowly.

@dontdieych
Copy link
Author

I'm using also 'fcitx' input method. If it is only me, I should try without fcitx.

@phracek
Copy link

phracek commented Feb 11, 2015

On Fedora 21 it is sometimes very slow too.
If I execute zeal from command line I see:
$ zeal
Using blocking call!
Using blocking call!
libpng warning: iCCP: Not recognizing known sRGB profile that has been edited
libpng warning: iCCP: Not recognizing known sRGB profile that has been edited
libpng warning: iCCP: Not recognizing known sRGB profile that has been edited
libpng warning: iCCP: Not recognizing known sRGB profile that has been edited
libpng warning: iCCP: Not recognizing known sRGB profile that has been edited
libpng warning: iCCP: Not recognizing known sRGB profile that has been edited

@trollixx
Copy link
Member

I tried Zeal with Xmonad (the only difference from my setup), but I couldn't reproduce the slowness.

There was also a SQLite bug in versions before 3.8.7, which caused a terrible slowdown of Quassel. But ArchLinux has the newest stuff already.

@dontdieych, have you tried Zeal without fcitx?

@phracek, more details on your environment, Zeal version and your set of docsets, please.

@phracek
Copy link

phracek commented Feb 12, 2015

Fedora 21 with Gnome desktop environment. SSD disc.
My zeal version is 20141123 and docsets are: Android, C,C++, Django, Python2, Python 3.

If you want to more information then just only ask.

@trollixx
Copy link
Member

@phracek, could you test Zeal from the master branch to see if it has the same issue too?

The current code has been changed significantly from the version 20141123.

@wjljack
Copy link

wjljack commented Feb 24, 2015

when i install android docset (the search index is very large) ,search term is really slow and UI thread paused.this UX is very bad,so can you
1.optimise search speed,even use sqlite for indexing ,try to optimise sqlite ,table indexes,search sql ,etc.
2.use another Thread to search and make a event callback to UI thread,it can prevent UI blocks.
zeal version:20150223
environment:windows 8.1/SSD/i7 3630qm/8G
docsets:
AngularJS/BackboneJS/Bash/Bootstrap/CSS/CommonLisp/HTML/JavasScript/Markdown/MySql/JQuery
and before i add android docset,the search speed is not very slow relative,i guess android docset is very large and entry number is also large.

ps:another suggestion is to add enable/disable downloaded docset to options,it can skip disabled downloaded docset to speed up.eg: add an checkbox before docset name.

@trollixx
Copy link
Member

@wjljack, I have ~20 docsets installed (including huge Android and .NET) and still search through index is really fast on my way weaker hardware. I'll try to reproduce your problem on Windows, maybe that's the issue. There's some logic, that needs to be moved in background threads, perhaps that'll improve your situation as well. I'll let you know, once I perform any performance optimisations.

For docset grouping see #77, we'll have it at some point, but no ETA yet.

@wjljack
Copy link

wjljack commented Feb 25, 2015

@trollixx thank you for your reply,perhaps the problem is windows version.I really like zeal very much,so hope your good news for solve it~

@bcorrigan
Copy link

I certainly find the windows version unusably slow. You can't scroll without it pausing and freezing for up tio 10 or 20 seconds. Restoring the window results in a freeze. Any searching or clicking about means endless freezing. This is the latest version as of writing on windows, with docsets for elasticsearch, jdk7, bash and emacs..

@wjljack
Copy link

wjljack commented Apr 3, 2015

@bcorrigan you are right,same like me,so I nearly can't use large docset like .net framework and android.

@trollixx
Copy link
Member

trollixx commented Apr 3, 2015

Okay, I've managed to reproduce the freezing. Seems to be a bug in QtWebKit. Due to obsolete status of QtWebKit I don't believe anyone would ever look into it.

A workaround I found is to disable JavaScript. Since Dash docsets have an option whether JS should be enabled or not, that should solve this issue.

@trollixx
Copy link
Member

trollixx commented Apr 3, 2015

Unfortunately, .NET docset requires JS to work properly. So, at the moment, I do not see a way to fix the problem :( I'll try to debug QtWebKit, but I have no idea what's happening under the hood there.

@aramazhari
Copy link

Hi,
Windows 8.1 64-bit
zeal 20141123

Docsets:
Android
Unity 3D

I also have a very slow search and it makes almost useless for me.
If you think Qt is slow, how about I help with a Mono prototype (just for the search algorithm) to see if switching to Mono.WebBrowser helps ( Mono supports both Gecko and Webkit) ?

@trollixx
Copy link
Member

trollixx commented Apr 9, 2015

@aramazhari Sorry for inconvenience. I really want to fix this issue, but it's not an easy one.

As a short-term workaround I'll add an option to disable JavaScript completely. Without JS support some docsets lack interactivity, but at least overall performance is acceptable.

The actual problem is in the obsolete Qt WebKit module. I would be happy to get rid of it, but there are some steps to be done. Qt WebEngine lacks some features Zeal needs and also requires use of MSVC for Windows builds. It's possible to make Zeal compile with MSVC 2013, but after my first try, Zeal just crashed somewhere in Qt WebEngine almost on any action.

If I do not find a way to make Qt WebEngine work for us, then most likely I'll try use CEF instead of modules provided by Qt. Another possibility is Qt WebView, which is going to have Internet Explorer support at some point.

So, I don't see much sense in trying out Mono or something else, as the problem is in one deprecated Qt module.

@comicfans
Copy link

I've tried to build zeal with Qt 5.5.1 WebEngine MSVC2013 ,It's faster, but every time new char typed in search input ,the web page widget will grab focus ...

@amosbird
Copy link

I've ran into the same issue. It's about 1 sec delay when typing into a character.
Windows 10
Zeal 0.2.1 Nov 19 2015
Docset: Rust

@wjljack
Copy link

wjljack commented Nov 23, 2015

plz try to refer velocity 's way,using lucene to search index key.

trollixx added a commit that referenced this issue Jul 19, 2016
Based on work by Artur Spychaj submitted in #460.
Related #265, #523.
Closes #564.
trollixx pushed a commit that referenced this issue Jul 20, 2016
When user types into the search box the previous search is canceled.
This improves the speed with which the results can be obtained.

Based on #460 plus cosmetic changes.
Related to #265, #523.
@trollixx
Copy link
Member

I think with all recent improvements to the search logic, and UI responsiveness we can consider this one fixed.

Please give it a try, by building Zeal yourself, or with a CI build. Alternatively wait for the 0.3.0 release.

@trollixx trollixx added this to the 0.3.0 milestone Sep 20, 2016
@lock
Copy link

lock bot commented Sep 16, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for a related request.

@lock lock bot locked and limited conversation to collaborators Sep 16, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

No branches or pull requests

9 participants