~mnordhoff/loggerhead/statictuples

« back to all changes in this revision

Viewing changes to loggerhead/changecache.py

  • Committer: Matt Nordhoff
  • Date: 2009-11-18 21:18:26 UTC
  • Revision ID: mnordhoff@mattnordhoff.com-20091118211826-440azil47ny06c0q
Style tweak.

This either has a negligible impact on performance or a very slight positive impact.

Curiously, making the same change to set() has a slight negative impact (~1.39 -> ~1.58 secs for LP).

(Boy, I've had this sitting on my hard drive since 2009-11-05T21:01:27Z without fully testing it...)

Show diffs side-by-side

added added

removed removed

Lines of Context:
146
146
            data_tuples = marshal.loads(zlib.decompress(row[1]))
147
147
            as_st = StaticTuple.from_sequence
148
148
            data_statictuples = [StaticTuple(
149
 
                as_st(x[0]).intern(), as_st(x[1]).intern(),
150
 
                as_st(x[2]).intern()).intern() for x in data_tuples]
 
149
                as_st(a).intern(), as_st(b).intern(),
 
150
                as_st(c).intern()).intern() for (a, b, c) in data_tuples]
151
151
            return data_statictuples
152
152
 
153
153
    def set(self, key, revid, data):