Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(60)

Issue 190051: Improve switch view (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
16 years ago by ced
Modified:
16 years ago
Reviewers:
bch, h.goebel
Visibility:
Public.

Description

- Don't fetch all records when new fields are added by views, re-fetch records only if new fields are displayed. - Use some list comprehension. - Use dictionaries to prevent double for loop.

Patch Set 1 #

Total comments: 6

Patch Set 2 : Make reload to reload also the 80 others records if needed #

Patch Set 3 : Use [:] instead of list to copy #

Patch Set 4 : Use get instead of testing key #

Patch Set 5 : Use get instead of testing key #

Unified diffs Side-by-side diffs Delta from patch set Stats (+37 lines, -60 lines) Patch
M tryton/gui/window/view_form/model/group.py View 1 2 4 chunks +10 lines, -18 lines 0 comments Download
M tryton/gui/window/view_form/model/record.py View 1 2 3 9 chunks +27 lines, -42 lines 0 comments Download

Messages

Total messages: 7
ced
16 years ago (2010-01-19 11:39:09 UTC) #1
h.goebel
http://codereview.appspot.com/190051/diff/1/2 File tryton/gui/window/view_form/model/group.py (right): http://codereview.appspot.com/190051/diff/1/2#newcode180 tryton/gui/window/view_form/model/group.py:180: for model in list(self.model_deleted): use self.model_deleted[:], since you are ...
16 years ago (2010-01-19 11:56:13 UTC) #2
h.goebel
http://codereview.appspot.com/190051/diff/1/3 File tryton/gui/window/view_form/model/record.py (right): http://codereview.appspot.com/190051/diff/1/3#newcode60 tryton/gui/window/view_form/model/record.py:60: if name not in self._loaded and self.id > 0: ...
16 years ago (2010-01-19 12:00:05 UTC) #3
ced
16 years ago (2010-01-19 12:20:05 UTC) #4
ced
16 years ago (2010-01-19 12:22:23 UTC) #5
ced
16 years ago (2010-01-19 12:25:41 UTC) #6
ced
16 years ago (2010-01-19 12:28:09 UTC) #7
http://codereview.appspot.com/190051/diff/1/3
File tryton/gui/window/view_form/model/record.py (right):

http://codereview.appspot.com/190051/diff/1/3#newcode68
tryton/gui/window/view_form/model/record.py:68: if name not in model._loaded and
model.id > 0:
On 2010/01/19 12:00:05, h.goebel wrote:
> should be more efficient:
> if model.id > 0 and not name in model_loaded

model.id > 0 is rarest case
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b