# HG changeset patch # User Paul Boddie # Date 1253317415 -7200 # Node ID 2bed39249624aa5c7e747d7e42367752d4adc77a # Parent e0fbe13922c1bc90674132a9916cf714b0ab1448 Introduced array usage when writing position index entries. diff -r e0fbe13922c1 -r 2bed39249624 iixr/positions.py --- a/iixr/positions.py Fri Sep 18 22:21:25 2009 +0200 +++ b/iixr/positions.py Sat Sep 19 01:43:35 2009 +0200 @@ -97,11 +97,14 @@ # Write the position file offset delta. # Write the document count. - output = [docnum - self.last_docnum, pos_offset - self.last_pos_offset, count] + output = array('B') + vint_to_array(docnum - self.last_docnum, output) + vint_to_array(pos_offset - self.last_pos_offset, output) + vint_to_array(count, output) # Actually write the data. - self.f.write("".join([vint(x) for x in output])) + output.tofile(self.f) self.last_pos_offset = pos_offset self.last_docnum = docnum