On 09/11/2011 13:16, Tommaso Cucinotta wrote:
Il 08/11/2011 21:37, Abdelrazak Younes ha scritto:

Too complicated for my taste :-)

What do you mean by "complicated", here ? Parallel is always more complicated than sequential. Still, we can't keep living in the sequential world, I guess you know.

Actually no. Don't get me wrong, thread are nice and we should use them whenever needed. In the case of Advanced search, I reckon that we need only one new thread to keep the UI responsive while the search is done in the background. This thread would communicate the matched string to the GUI thread so that it can display it, sequentially. Anything more is just a pretext to not address the real issue. Threads is not always about using all available processors.

Let's put it this way: this parallel patch is a small, incremental modification to the code base that speeds up searching on most nowadays PCs.

First, I don't think your patch is small. Second, the need for mutexes is often a sign that something is wrong in the architecture.

Compare with rewriting the search capability from scratch, that would require a huge invasive patch modifying probably each and every inset.... that deserves the "complicated" adjective, IMHO :-)

Who said that we should rewrite from scratch? You could begin at least with Paragraphs. Then one inset at the time. I believe the code will hugely benefits from this work as we would then have means to compare easily and effciently two paragraphs, two insets, etc. I guess that could be useful for Change-Tracking for example.

[but, again, I agree that it would also reduce the search time by one or two orders of magnitude].

Here at least we agree ;-)

Cheers,
Abdel.

Reply via email to