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

Issue 10687043: [trytond] Improve MPTT performance

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years, 10 months ago by vishesh3y
Modified:
10 years, 10 months ago
Reviewers:
sharoon.thomas
Visibility:
Public.

Description

[trytond] Improve MPTT performance

Patch Set 1 #

Total comments: 18

Patch Set 2 : [trytond] Improve MPTT performance #

Patch Set 3 : [trytond] Improve MPTT performance #

Patch Set 4 : [trytond] Improve MPTT performance #

Unified diffs Side-by-side diffs Delta from patch set Stats (+46 lines, -96 lines) Patch
M trytond/model/modelsql.py View 1 2 3 1 chunk +46 lines, -96 lines 0 comments Download

Messages

Total messages: 2
sharoon.thomas
https://codereview.appspot.com/10687043/diff/1/trytond/model/modelsql.py File trytond/model/modelsql.py (right): https://codereview.appspot.com/10687043/diff/1/trytond/model/modelsql.py#newcode1916 trytond/model/modelsql.py:1916: Create space of 'size' after node with right = ...
10 years, 10 months ago (2013-06-27 13:13:20 UTC) #1
vishesh3y
10 years, 10 months ago (2013-06-27 16:49:46 UTC) #2
Done with the changes you recommended.

https://codereview.appspot.com/10687043/diff/1/trytond/model/modelsql.py
File trytond/model/modelsql.py (right):

https://codereview.appspot.com/10687043/diff/1/trytond/model/modelsql.py#newc...
trytond/model/modelsql.py:1916: Create space of 'size' after node with right =
target.
On 2013/06/27 13:13:20, sharoon.thomas wrote:
> describe the params

Done.

https://codereview.appspot.com/10687043/diff/1/trytond/model/modelsql.py#newc...
trytond/model/modelsql.py:1934: '''
On 2013/06/27 13:13:20, sharoon.thomas wrote:
> Describe the params

Done.

https://codereview.appspot.com/10687043/diff/1/trytond/model/modelsql.py#newc...
trytond/model/modelsql.py:1938: cursor.execute('SELECT "' + left + '", "' +
right + '", "' + field_name + '" '
On 2013/06/27 13:13:20, sharoon.thomas wrote:
> more than 80 chars

Done.

https://codereview.appspot.com/10687043/diff/1/trytond/model/modelsql.py#newc...
trytond/model/modelsql.py:1947: parent_right = 1
On 2013/06/27 13:13:20, sharoon.thomas wrote:
> this seems to be used only in the case where parent_id is None and this could
go
> to the else case of the lookup from db for max(right)

Done.

https://codereview.appspot.com/10687043/diff/1/trytond/model/modelsql.py#newc...
trytond/model/modelsql.py:1956: if not fetchone:
On 2013/06/27 13:13:20, sharoon.thomas wrote:
> you dont have to cover for thsi since this will never happen ?

Done.

https://codereview.appspot.com/10687043/diff/1/trytond/model/modelsql.py#newc...
trytond/model/modelsql.py:1958: parent_left, parent_right = fetchone
On 2013/06/27 13:13:20, sharoon.thomas wrote:
> parent_left, parent_right = cursor.fetchone()

Done.

https://codereview.appspot.com/10687043/diff/1/trytond/model/modelsql.py#newc...
trytond/model/modelsql.py:1960: old_parent_right = parent_right
On 2013/06/27 13:13:20, sharoon.thomas wrote:
> you dont need this

Done.

https://codereview.appspot.com/10687043/diff/1/trytond/model/modelsql.py#newc...
trytond/model/modelsql.py:1961: parent_right += 2
On 2013/06/27 13:13:20, sharoon.thomas wrote:
> you dont need this

Done.

https://codereview.appspot.com/10687043/diff/1/trytond/model/modelsql.py#newc...
trytond/model/modelsql.py:1965: 'WHERE id = %s', (old_parent_right,
old_parent_right + 1, object_id,))
On 2013/06/27 13:13:20, sharoon.thomas wrote:
> more than 80 chars

Done.
Sign in to reply to this message.

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