jerch

Results 550 comments of jerch

Interesting that you bring this up, in fact I had this mind for some time already. The question is - would it be enough to disable all CF actions in...

> Maybe just synchronize everything upon exiting the context manager block (by default)? Imho thats not a good idea - for any reasonably sized database with tricky CF setup this...

> I mean re-sync not everything, but stuff changed in the context manager scope. Well thats what I mean with "tracking changes". That's not easy doable in an automated fashion....

Yeah in general there is a high chance to miss updates at certain ends with M2M, kinda learned that the hard when I implemented it initially. M2Ms are esp. tricky,...

I looked into your test PR example, this is what happens under the hood (tested with sqlite): ```python with CaptureQueriesContext(connection) as cqc: advert_1.tags.set([tag_2]) for i, q in enumerate(cqc.captured_queries): print(i, q)...

@martinlehoux Here is a rewrite with bulk actions, where possible: ```python from django.test import TestCase from . import models from django.test.utils import CaptureQueriesContext from django.db import connection from computedfields.models import...

What also would be possible to mitigate the doubled processing for M2M `set()` - provide an alternate impl, that skips the _m2m_changed_ signal handler, instead doing the cf updates afterwards,...

@martinlehoux I did some checks for related managers in general. And as I thought, they currently dont work with the default `bulk=True` argument. Therefore I created #146. If that ticket...

@martinlehoux Yes thats likely an issue with my hand-crafted optimization of your shown model/data - those hand-crafted solutions always end up being of limited usage for a broader adoption.

@martinlehoux Sorry, had not yet time to look further into it. Hopefully will get back it next week...