← Back to team overview

qpdfview team mailing list archive

Re: Improved Search

 

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1



On 30.06.2012 13:18, Adam Reichold wrote:
> Hallo David,
> 
> On 29.06.2012 17:37, David Sidler wrote:
>> Hi Adam,
> 
>> i stopped working on the index stuff because as you mentioned the
>>  disadvantage of the memory consumption is to high, additionally
>> it takes a lot of time to create the index for big files (e.g.
>> books). Therefore i think it also makes no sense to create the
>> index on demand.
> 
> I agree with these assesments.
> 
>> i recommend to use a similar approach as in the current version 
>> while improving performance, so that it also would make sense to 
>> search multiple documents simultaneously. If you like i can work
>> on this.
> 
> There is already something happing on the performance front: I 
> submitted a patch for the Qt4 frontend of poppler to introduce a 
> method that searches the whole page at once. It is not yet in but
> it does not look too bad.
> 
> If it get's into poppler version 0.22, we can count on a huge
> speed improvement (well above 100 % as measured in runtime,
> especially for short phrases that occur often) for the search
> beginning with that poppler version.
> 
> If you'd like to test it, have a look at the poppler patch in the 
> mailing list thread 
> http://lists.freedesktop.org/archives/poppler/2012-June/009351.html
>
> 
and look for the comment "// HAS_POPPLER_22" in the search function of
> DocumentView.

This has to be amended: The patch was just committed to poppler master
and I commited the necessary #ifdefs so that qpdfview uses it if the
poppler version is at least 0.22.

So one now just needs to compile poppler master and trick qpdfview.pro
into linking against that and add "DEINFES += HAS_POPPLER_22".

>> BTW, not really on topic, but do you plan to start the page
>> index in this future version at 0 like poppler, instead of 1 like
>> in the current version? I think it's quite odd to start the index
>> at 1 especially when the underlying library starts at 0
> 
> I completely agree! The "m_results" QMap will indeed now map page 
> indices instead of page numbers. Sadly enough, version 0.3 got
> much more messy than I wanted it to be. The future branch looks
> much better in that regard.
> 
> I think I will be able to commit the changes necessary to
> implement the current search functionality of trunk in future
> tonight. So maybe you could have a look at that stuff and comment
> on it? (As I said, the future code base is much cleaner and
> hopefully easier to read an understand. I'm really sorry about the
> 0.3-mess...)
> 
> Best regards, Adam.
> 
>> best regards, David
> 
>> On Jun 23, 2012 10:20 AM, "Adam Reichold" 
>> <adamreichold@xxxxxxxxxxx <mailto:adamreichold@xxxxxxxxxxx>> 
>> wrote:
> 
>> Hello David,
> 
>> Maybe you noticed the branch "lp:~adamreichold/qpdfview/future" 
>> which is supposed to become the next or some later version. I 
>> focussed on rendering, memory consumption and code size
>> reduction for now. Therefore I have not done anything on search,
>> so maybe this is a good time to discuss this?
> 
>> My current minimal plan is to replace search via 
>> Poppler::Page::search by a search via Poppler::Page::textList
>> which is much faster already. I just have to get all the corner
>> cases correctly.
> 
>> Best regards, Adam.
> 
>> On 02.06.2012 00:11, David Sidler wrote:
>>> Hi all,
> 
>>> I'm new to launchpad, but i checked out the few days ago and 
>>> started to modify the search.
> 
>>> So here is how i imagine the an improved search: - search index
>>>  creation after opening the file for way faster search - the 
>>> standard search in the bottom toolbar has an additional button 
>>> for advanced search - the advanced search is in the sidebar
>>> (like the ouline). it supports more search options and is able
>>> to search in all open tabs
> 
> 
> 
> 
> 
> 
> 
>> -- Mailing list: https://launchpad.net/~qpdfview Post to     : 
>> qpdfview@xxxxxxxxxxxxxxxxxxx
>> <mailto:qpdfview@xxxxxxxxxxxxxxxxxxx> Unsubscribe :
>> https://launchpad.net/~qpdfview More help   : 
>> https://help.launchpad.net/ListHelp
> 
> 
> 

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJP7v6WAAoJEPSSjE3STU346qkH/2lwfB4yfoSCZBeYY0ydSTOk
frcyCw68lTXqnXkzvQQMrTdu4Wx1E9sulHix7QQosbVRgHc4OIrPAn1VTz1g2Chk
W4Ii0KKDkxKoMGINolVTRJAKvgm0ce1yKAIngNsRvjy5evo6mX01jEJ7QOpOp9Ed
F7JmDH0roL8PSviQO60/ZYrA/pmArEfI5LVBiYy6alnxKIzd4/K+0PWgB6dN3GuN
gGL7SaqJHMpxTk+ahjbXHoDSEBm0SOt83BAlEpQz4tKdXEOtjfOnp6yY2U++MMLF
bm+J63EMdLYspxC42rfsdhGuSJB639CRF/Tkn+th2w4e4l6AVY6shJ+XclXRAac=
=JZvd
-----END PGP SIGNATURE-----


References