Created on 2020-04-15.00:35:50 by albertca, last changed 5 months ago by roundup-bot.
New changeset baa1fcd4a061 by Cédric Krier in branch 'default': Use custom class to store record data https://hg.tryton.org/tryton-env/rev/baa1fcd4a061
New changeset 22260a3783da by Cédric Krier in branch 'default': Use custom class to store record data https://hg.tryton.org/trytond/rev/22260a3783da
New changeset b569af4f7d88 by Cédric Krier in branch 'default': Use custom class to store record data https://hg.tryton.org/modules/party_relationship/rev/b569af4f7d88
Here is review297861002 which reuse the idea of review323101002 but generalize to all kind of fields (instead of only to xxx2one, xxx2many and reference).
The proposal change does not help to detect bugs or miss-usage. It would be allowed if we could guarantee that the local_cache can not be filled with unknown keys. Maybe using a namedtuple could solve that.
ModelStorage.__getattr__ is called millions of times so trying to do some small optimizations can have some impact in many cases. I tested using a simple loop: Location = pool.get('stock.location') loc = Location(1) for x in range(300000 * 5): loc.provisioning_location loc.overflowing_location The optimizations proposed in the review improve performance by about 16%.
|2020-06-13 09:48:47||roundup-bot||set||messages: + msg58685|
|2020-06-13 09:48:38||roundup-bot||set||messages: + msg58683|
|2020-06-13 09:48:33||roundup-bot||set||status: testing -> resolved|
nosy: + roundup-bot
messages: + msg58681
|2020-05-26 18:38:03||reviewbot||set||messages: + msg58298|
|2020-05-26 18:07:38||reviewbot||set||messages: + msg58295|
|2020-05-26 17:32:45||ced||set||status: in-progress -> testing|
reviews: 323101002 -> 323101002,297861002
superseder: + Improve memory usage of storing record values
messages: + msg58291
|2020-05-25 19:31:46||ced||set||status: testing -> in-progress|
messages: + msg57937
|2020-04-15 08:55:20||pokoli||set||nosy: + pokoli|
messages: + msg57160
Showing 10 items. Show all history (warning: this could be VERY long)