Created on 2021-11-08.19:34:50 by edbo, last changed 12 months ago by roundup-bot.
New changeset 065cb0e9cdbf by Cédric Krier in branch 'default': Create record by XML for test with readonly transaction https://hg.tryton.org/tryton-env/rev/065cb0e9cdbf
New changeset 8cd6dd7196eb by Cédric Krier in branch 'default': Create record by XML for test with readonly transaction https://hg.tryton.org/trytond/rev/8cd6dd7196eb
New changeset c2ea6e5aae39 by Cédric Krier in branch 'default': Cache Function field getter without context in readonly transactions https://hg.tryton.org/tryton-env/rev/c2ea6e5aae39 New changeset cec633cfdf8f by Cédric Krier in branch 'default': Fill local cache of Function field instances with values https://hg.tryton.org/tryton-env/rev/cec633cfdf8f
New changeset 3193180548e8 by Cédric Krier in branch 'default': Cache Function field getter without context in readonly transactions https://hg.tryton.org/trytond/rev/3193180548e8 New changeset 82b1408ceaa2 by Cédric Krier in branch 'default': Fill local cache of Function field instances with values https://hg.tryton.org/trytond/rev/82b1408ceaa2
New changeset 9a06b013733b by Cédric Krier in branch '6.2': Do not store in global cache Function field https://hg.tryton.org/trytond/rev/9a06b013733b
New changeset 02adfd3a00b9 by Cédric Krier in branch 'default': Do not store in global cache Function field https://hg.tryton.org/tryton-env/rev/02adfd3a00b9
New changeset 055efc4c622f by Cédric Krier in branch 'default': Do not store in global cache Function field https://hg.tryton.org/trytond/rev/055efc4c622f
Here are the two new implementations and the removal of the feature in 6.2. I updated the changelog in order to not create confusion about the actual feature implemented in this series.
I think we must remove the feature in 6.2 series as it can not work by design and re-implementing it will need to change the API (see the following proposal).
So in order to keep the performance improvement I see two possibilities (which can both be implemented) which restore partially the initial goal:
Functionfield which define if the
getterfunction depends on the context or not. If it does not depend we can store the result in the global cache in readonly transaction. (I could not find any other method than a flag, I tried to detect usage of context but there are two much side-effect). Also in this case the
Functionfield must reset the context (with only the cache keys of transaction) to ensure that the result is independent of it (and to detect wrong configuration).
valuesalready read. This can only be done for base python type like numeric or string but not with instances. This can be done also on non-readonly transaction but it will improve the performance only for the current instances (not if the value is reused by an indirect instance).
This is linked to issue10491. Indeed storing the in the cache the result of function field that depends of the context does not work because transactional cache is only depending on few contextual parameters.
It seems like the data is taken from the comparing part.
I upgraded today to version 6.2 and walked into this problem. You can compare the Balance or Income Statement with an earlier 'version' using the context. But changing the context and refreshing the data does not update the amounts anymore and they stay the same.
|2021-11-28 14:31:55||roundup-bot||set||messages: + msg71905|
|2021-11-28 14:31:51||roundup-bot||set||messages: + msg71904|
|2021-11-28 13:41:10||roundup-bot||set||messages: + msg71894|
status: chatting -> resolved
|2021-11-15 14:31:16||edbo||set||messages: + msg71674|
|2021-11-15 00:28:39||reviewbot||set||messages: + msg71661|
status: resolved -> chatting
messages: + msg71659
status: testing -> resolved
status: resolved -> testing
|2021-11-14 23:55:07||roundup-bot||set||messages: + msg71655|
Showing 10 items. Show all history (warning: this could be VERY long)