← Back to team overview

qpdfview team mailing list archive

Re: Improved Search

 

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

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.

> 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/

iQEcBAEBAgAGBQJP7uCcAAoJEPSSjE3STU34ljwH/jW4XdIhswe5hfHLqd8ImwjU
og/68NrA0cOostViRha8qvDBCAyUZh+7zUXbklMvk8rD9DNFJysl4EWvRTvppZ3U
LRI3majgR/sGarGxWpGf/vUMAQXdmTYJ9t5wrKBz+G+azxgs97DmLjy+QZV6iVSC
rDEQxFiqC6la8FbUZdRWDD4QkVwJuH92vEeKG9yy3Mytp5tBnBJM4uFy/3R1wa0E
4/hZChiYWiWBQVBDhTN5GxmyLS789isploAHAgNdHM/FKKZulDjXjut7+BU1SlHn
1SowyWvFlNjWzlKki3JF+DvxB76QnWm8bYeQoS4PbQZcXr5rmYrI7sIuTsckows=
=psEQ
-----END PGP SIGNATURE-----


Follow ups

References