Skip to content

Add a counter to memcach so that we can detect data change#316

Merged
hugtalbot merged 1 commit intosofa-framework:masterfrom
CRIStAL-PADR:pr-fix-issue-313
Dec 7, 2022
Merged

Add a counter to memcach so that we can detect data change#316
hugtalbot merged 1 commit intosofa-framework:masterfrom
CRIStAL-PADR:pr-fix-issue-313

Conversation

@damienmarchal
Copy link
Copy Markdown
Contributor

@damienmarchal damienmarchal commented Nov 14, 2022

The issue 313 shows that the memcache is not updated when the data have changed but the flag is not anymore dirty. This happens when between the change and the call to the writeable() function somewhere else in Sofa, a component/controller/the gui had called the updateIfDirty() method.

In order to detect the "no more dirty but changed data" a counter is added to the memcache enties so we can detect if it is different from the counter stored in the BaseData.

fix issue #313

The PR also restore all the tests in Base.py that are failing silently since a long time (the fact that parse error in python tests can get un-noticed is very problematic, we should fix that one day.).

@hugtalbot
Copy link
Copy Markdown
Contributor

CI restarted
Could you please add a proper title @damienmarchal

@damienmarchal damienmarchal added this to the v22.12 milestone Dec 6, 2022
@damienmarchal damienmarchal changed the title FIX Issue 313 Add a counter to memcach so that we can detect data change (FIX Issue 313) Dec 6, 2022
@damienmarchal damienmarchal removed this from the v22.12 milestone Dec 6, 2022
@damienmarchal damienmarchal added this to the v22.12 milestone Dec 7, 2022
@hugtalbot hugtalbot changed the title Add a counter to memcach so that we can detect data change (FIX Issue 313) Add a counter to memcach so that we can detect data change Dec 7, 2022
@hugtalbot hugtalbot added the enhancement New feature or request label Dec 7, 2022
@hugtalbot
Copy link
Copy Markdown
Contributor

Fix needed when we use the cache of SOFA data loaded into python. The unit test had an issue but not emitting a proper test error. A benchmark comparing the use and no use of this cache in term of performance would be really nice.

@epernod
Copy link
Copy Markdown
Contributor

epernod commented Dec 7, 2022

Hello @ScheiklP , this PR should fix the problem you had on the size of the vector position before/after adding points.
If you have time, could you check if you see a big difference of performances on your scenes with this change.
Thanks

@hugtalbot hugtalbot merged commit 8b6c5eb into sofa-framework:master Dec 7, 2022
@ScheiklP
Copy link
Copy Markdown
Collaborator

ScheiklP commented Dec 7, 2022

Hi @epernod,
tested and approved. :D
There is a very small drop in FPS (from 51 to 50) that I would not have noticed if I did not check.

Thanks a lot! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request pr: status ready

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants