[MERGE] Use a list not a tuple for chunks returned from FullTextContentFactory objects, because otherwise code tries to assign to tuples.

Robert Collins robertc at robertcollins.net
Tue Feb 3 20:20:14 GMT 2009


On Tue, 2009-02-03 at 10:03 -0600, John Arbash Meinel wrote:

> You know what... the problem could be if 'fulltext' is empty, or a
> single line long. In that case the 'chunks_to_lines()' code will loop,
> and see that all of the entries are valid lines, and just return the
> original object, rather than returning a list.
> 
> So probably a better fix is to change the chunks_to_lines code to always
> create a new list, rather than returning the original object. There
> would be some overhead in creating a new list, and then getting rid of
> the original, but it shouldn't be a lot.

I was assuming that we didn't want to add overhead :P. In particular for
large texts, just making a new list can be quite time consuming in
aggregate, as learnt in previous commit optimisation efforts.

-Rob
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20090204/57aa2f9e/attachment.pgp 


More information about the bazaar mailing list