Merge lp:~paul-lucas/zorba/pjl-misc into lp:zorba

Proposed by Paul J. Lucas
Status: Merged
Approved by: Paul J. Lucas
Approved revision: 11302
Merged at revision: 11588
Proposed branch: lp:~paul-lucas/zorba/pjl-misc
Merge into: lp:zorba
Diff against target: 49 lines (+9/-5)
2 files modified
src/runtime/full_text/apply.cpp (+6/-3)
src/runtime/full_text/ft_match.h (+3/-2)
To merge this branch: bzr merge lp:~paul-lucas/zorba/pjl-misc
Reviewer Review Type Date Requested Status
Matthias Brantner Approve
Paul J. Lucas Approve
Review via email: mp+178871@code.launchpad.net

Commit message

Optimization for same sentence/paragraph.

Description of the change

Optimization for same sentence/paragraph.

To post a comment you must log in.
Revision history for this message
Paul J. Lucas (paul-lucas) :
review: Approve
Revision history for this message
Matthias Brantner (matthias-brantner) :
review: Approve
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :

Validation queue starting for the following merge proposals:
https://code.launchpad.net/~paul-lucas/zorba/pjl-misc/+merge/178871

Progress dashboard at http://jenkins.lambda.nu/view/ValidationQueue

Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :

Validation queue succeeded - proposal merged!

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'src/runtime/full_text/apply.cpp'
--- src/runtime/full_text/apply.cpp 2013-06-12 00:21:05 +0000
+++ src/runtime/full_text/apply.cpp 2013-08-07 01:20:38 +0000
@@ -770,9 +770,12 @@
770770
771 FOR_EACH( ft_all_matches, m, am ) {771 FOR_EACH( ft_all_matches, m, am ) {
772 bool every_satisfies = true;772 bool every_satisfies = true;
773 FOR_EACH( ft_match::includes_t, i1, m->includes ) {773 if ( m->includes.size() > 1 ) {
774 FOR_EACH( ft_match::includes_t, i2, m->includes ) {774 ft_match::includes_t::const_iterator i( m->includes.begin() );
775 if ( &*i1 != &*i2 && !same( *i1, *i2, sep ) ) {775 ft_match::includes_t::const_iterator const end( m->includes.end() );
776 ft_match::includes_t::value_type const &first = *i;
777 while ( ++i != end ) {
778 if ( !same( first, *i, sep ) ) {
776 every_satisfies = false;779 every_satisfies = false;
777 break;780 break;
778 }781 }
779782
=== modified file 'src/runtime/full_text/ft_match.h'
--- src/runtime/full_text/ft_match.h 2013-02-07 17:24:36 +0000
+++ src/runtime/full_text/ft_match.h 2013-08-07 01:20:38 +0000
@@ -19,6 +19,7 @@
1919
20#include <algorithm>20#include <algorithm>
21#include <list>21#include <list>
22#include <vector>
2223
23#include "ft_token_span.h"24#include "ft_token_span.h"
2425
@@ -65,7 +66,7 @@
65/**66/**
66 * An %ft_string_matches contains zero or more ft_string_match objects.67 * An %ft_string_matches contains zero or more ft_string_match objects.
67 */68 */
68typedef std::list<ft_string_match> ft_string_matches;69typedef std::vector<ft_string_match> ft_string_matches;
6970
70///////////////////////////////////////////////////////////////////////////////71///////////////////////////////////////////////////////////////////////////////
7172
@@ -94,7 +95,7 @@
94 if ( !includes_sorted_ ) {95 if ( !includes_sorted_ ) {
95 includes_sorted_ = true;96 includes_sorted_ = true;
96#endif97#endif
97 includes.sort();98 std::sort( includes.begin(), includes.end() );
98#if FT_MATCH_OPTIMIZE_SORT99#if FT_MATCH_OPTIMIZE_SORT
99 }100 }
100#endif101#endif

Subscribers

People subscribed via source and target branches