Merge lp://qastaging/~numerigraphe-team/report-print-send/7.0-no-lock-in-update-1308635-ls into lp://qastaging/~report-print-send-core-editors/report-print-send/7.0
Status: | Rejected |
---|---|
Rejected by: | Pedro Manuel Baeza |
Proposed branch: | lp://qastaging/~numerigraphe-team/report-print-send/7.0-no-lock-in-update-1308635-ls |
Merge into: | lp://qastaging/~report-print-send-core-editors/report-print-send/7.0 |
Diff against target: |
32 lines (+6/-11) 1 file modified
base_report_to_printer/printing.py (+6/-11) |
To merge this branch: | bzr merge lp://qastaging/~numerigraphe-team/report-print-send/7.0-no-lock-in-update-1308635-ls |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Yannick Vaucher @ Camptocamp | moved on github | Needs Resubmitting | |
Loïc Bellier - Numérigraphe (community) | Abstain | ||
Review via email:
|
Description of the change
If I'm not mistaken, locking in printer.
- if what we read is immutable than the value is copied and locking is unnecessary
- if it's mutable then we're getting a "reference" to the shared object, and should keep the lock until we're completely done with it
From my quick code survey, the variables seem to contain a boolean and a float so I guess no locking is needed.
update() seems to be called pretty often (all the CRUD method call it) so It may help a bit to remove the contention.
Unmerged revisions
- 13. By Numérigraphe
-
[IMP] remove useless locking from update(), shouldn't be needed for immutable data
Lionel,
Maybe you can have a conflict with line "for _ in range(0, 5):" on line 24 tools.translate import _" has been added ?
if the import "openerp.
LB