johnturek / advanced-find

Automatically exported from code.google.com/p/advanced-find
0 stars 0 forks source link

search action will block the ui event #51

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
When I search/replace in the folder which get a lot of result in a few minute, 
it will block the other operation on gedit, even if I'm going to stop the 
search action. 
Why not make it become asynchronous? I read the source and find this code: 

        self._results_view.is_busy(True)
        self._results_view.do_events()

Is it necessary? How do I make it non-blocking?

Original issue reported on code.google.com by li.jia...@gmail.com on 9 Feb 2012 at 2:18

GoogleCodeExporter commented 9 years ago
The plugin does not block any gedit operation while searching/replacing.
The code you post is used to implement stop searching function.
Actually, the do_events function is used to not blocking gtk+ event while 
searching.

However, any change of documents may make the search results wrong.
It's recommended NOT doing anything while searching/replacing.

Original comment by swatch.c...@gmail.com on 9 Feb 2012 at 12:38

GoogleCodeExporter commented 9 years ago
I've reinstalled the plugin and found the situation not change. The attachment 
shows it cannot refresh UI when I resize the window.

OS: Ubuntu 11.10
Gedit version: 3.2.3
advanced-find plugin version: 3.3.6

Original comment by li.jia...@gmail.com on 9 Feb 2012 at 3:06

Attachments:

GoogleCodeExporter commented 9 years ago
What pattern did you search for?
What option did you used for searching?
What kind of files in the directory?
Did the searching finish correctly?

I need more details.
Thanks.

Original comment by swatch.c...@gmail.com on 9 Feb 2012 at 11:51

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
I do the same thing again. The search option is in the picture attached. But I 
found that plugin do not block the ui completely, it seems easy to block the 
'heavy' search(such as I have a lot of files or some file is very large)

Original comment by li.jia...@gmail.com on 10 Feb 2012 at 4:27

Attachments:

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
The function, searching in directory, use external grep to find out what files 
contain the pattern.
I believe the situation is because of the limit of grep, but I think nothing I 
can do for that.
So, be patient while the searching is running or you can narrow down the search 
scope by yourself.

Original comment by swatch.c...@gmail.com on 10 Feb 2012 at 3:26

GoogleCodeExporter commented 9 years ago

Original comment by swatch.c...@gmail.com on 18 Feb 2012 at 4:21