The solution is to use select2 <https://select2.org/data-sources/ajax> with
ajax

El vie, 25 feb 2022 a la(s) 19:58, Jacob Greene ([email protected])
escribió:

> If you're using model choice fields, it's very likely you are making an
> SQL query for each form set. It should be pretty obvious in the log with
> debug turned on.
>
> On Fri, Feb 25, 2022, 4:31 PM Ryan Nowakowski <[email protected]> wrote:
>
>> Steven, are you using ModelFormSet?  If so, Is it the initial query
>> that's slow?  The form rendering?  Or is it the POST back to the server
>> that's slow?  You can use django-debug-toolbar[1] to profile your page
>> and get these metrics.
>>
>> Once you figure out what part is slowest, then you can optimize.
>>
>> Hope this helps!
>>
>> Ryan N
>>
>> [1] https://django-debug-toolbar.readthedocs.io/en/latest/
>>
>> On Mon, Feb 07, 2022 at 09:12:48AM -0800, Steven Smith wrote:
>> > Did this issue ever get resolved?  I'm experiencing the same thing.
>> Once
>> > it hits 100 forms or so it gets pretty slow.
>> >
>> > On Monday, September 22, 2014 at 10:48:52 AM UTC-5 Collin Anderson
>> wrote:
>> >
>> > > Yes, if you want speed, using javascript and ajax is probably your
>> best
>> > > bet. It will probably also reduce merge-conflicts.
>> > >
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Django users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected].
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/20220225222926.GH11627%40fattuba.com
>> .
>>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAF-Y%3De5Fp7kDtLq47Z3Y4GEjXMne2PcTLYxOJ8St5gkKCkpUpw%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CAF-Y%3De5Fp7kDtLq47Z3Y4GEjXMne2PcTLYxOJ8St5gkKCkpUpw%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAGAbt9M3N%2BU8eewvChkZk9s1r75DQ7t_qnO%2Bm5VMV8Y0VSh6zQ%40mail.gmail.com.

Reply via email to