Tryton - Issues



Title Random LRU cache cleared
Priority bug Status resolved
Superseder Nosy List ced, reviewbot, roundup-bot
Type performance Components trytond
Assigned To ced Keywords review
Reviews 318041002
View: 318041002

Created on 2020-08-03.12:49:06 by ced, last changed by roundup-bot.

New changeset 89c4f348090e by Cédric Krier in branch 'default':
Use the ids order to fill cache with read data
New changeset acdbdcac6687 by Cédric Krier in branch 'default':
Use the ids order to fill cache with read data
review318041002 updated at
msg59598 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2020-08-03.12:49:06
When browsing a number of record larger than the cache size, we start to see performance degradation.
I could trace it to the filling of the cache in ModelStorage.__getattr__ with the read result. This is because the read result is not necessary in the same order as the list of ids. So the cache is filled using a random order and so when it starts to be cleared, it may clear an id that was not yet used in the loop. So the cache starts to have holes which triggers more read than expected and slow down the code.
Date User Action Args
2020-08-10 23:24:32roundup-botsetmessages: + msg59677
2020-08-10 23:24:20roundup-botsetstatus: testing -> resolved
nosy: + roundup-bot
messages: + msg59676
2020-08-03 13:24:12reviewbotsetnosy: + reviewbot
messages: + msg59599
2020-08-03 12:54:04cedsetstatus: in-progress -> testing
reviews: 318041002
keyword: + review
2020-08-03 12:49:06cedcreate

Showing 10 items. Show all history (warning: this could be VERY long)