Merge lp:~sil/desktopcouch/dont-parse-all-the-changes into lp:desktopcouch

Proposed by Stuart Langridge
Status: Merged
Approved by: Chad Miller
Approved revision: 143
Merge reported by: Chad Miller
Merged at revision: not available
Proposed branch: lp:~sil/desktopcouch/dont-parse-all-the-changes
Merge into: lp:desktopcouch
Diff against target: 13 lines (+1/-4)
1 file modified
desktopcouch/records/server_base.py (+1/-4)
To merge this branch: bzr merge lp:~sil/desktopcouch/dont-parse-all-the-changes
Reviewer Review Type Date Requested Status
Chad Miller (community) Approve
Eric Casteleijn (community) Approve
Review via email: mp+22414@code.launchpad.net

Description of the change

Don't parse all the _changes feed; work out update_seq from the DB info, so we never request the whole feed, which is doom when the whole feed is large.

To post a comment you must log in.
Revision history for this message
Eric Casteleijn (thisfred) wrote :

Makes sense, looks good, tests pass.

review: Approve
Revision history for this message
Chad Miller (cmiller) wrote :

Thank you, sir.

review: Approve
Revision history for this message
Chad Miller (cmiller) wrote :

Really superceded, but tarmac hates this proposal for some reason that it refuses to tell.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'desktopcouch/records/server_base.py'
2--- desktopcouch/records/server_base.py 2010-03-18 19:15:09 +0000
3+++ desktopcouch/records/server_base.py 2010-03-29 22:00:49 +0000
4@@ -153,10 +153,7 @@
5 self.record_factory = record_factory or Record
6 self._changes_since = 0
7 self._changes_last_used = 0
8- try:
9- self.report_changes(lambda **_: None) # Update _changes_since.
10- except IOError:
11- pass
12+ self._changes_since = self.db.info()["update_seq"]
13 self._changes_last_used = 0 # Immediate run works.
14
15

Subscribers

People subscribed via source and target branches