Issue 10359

Title
ModelSQL does extra read on model's write_date when reading only relational or function fields
Priority
feature
Status
in-progress
Nosy list
ced, nicoe, reviewbot
Assigned to
nicoe
Keywords
review

Created on 2021-04-27.10:27:00 by nicoe, last changed 1 month ago by reviewbot.

Messages

Author: [hidden] (nicoe) Tryton committer
Date: 2021-04-27.11:19:59

What happens is that sometimes you'll read only a function field (because eager fields have prefetched by the search) which will be computed afterwards in the loop of the getter fields.

Author: [hidden] (ced) Tryton committer Tryton translator
Date: 2021-04-27.10:36:06

What is the point of reading no fields?

Author: [hidden] (nicoe) Tryton committer
Date: 2021-04-27.10:26:59

Since issue9013 we're unconditionnaly reading the write_date of records even when no other field is read.
This behaviour results in a huge penalty when the model is using table_query that could be quite heavy.

History
Date User Action Args
2021-05-04 16:18:18reviewbotsetmessages: + msg67363
2021-04-28 11:49:38reviewbotsetmessages: + msg67038
2021-04-27 11:19:59nicoesetmessages: + msg66999
2021-04-27 10:54:16reviewbotsetmessages: + msg66996
nosy: + reviewbot
2021-04-27 10:36:06cedsetmessages: + msg66993
nosy: + ced
2021-04-27 10:27:00nicoecreate

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