I tried with 500 forms instead of 25. Now the time is becoming appaling.---
117 seconds. Second time it hung.

2009-01-07 01:42:13,812 INFO Start - 4.46984183744e-006
2009-01-07 01:42:13,812 INFO Formset Class created- 0.000422958783868
2009-01-07 01:44:11,703 INFO Created new formset- 117.90750668
2009-01-07 01:44:17,203 INFO All forms done - 123.39991647
2009-01-07 01:44:17,217 INFO Start - 123.416734808
2009-01-07 01:44:17,217 INFO Formset Class created- 123.41704658

Regards
K

On 1/7/09, Kottiyath Nair <n.kottiy...@gmail.com> wrote:
>
> Hi all,
>    My web application sends a medium size data grid (20 elements). I was
> using formsets for the same.
>    The issue I am facing is that the formset instantiation is very very
> slow. I timed it and it is taking ~4-7 seconds for it to instantiate.
>    Is there someway the speed can be increased?
>
> There are no files sent. I am planning to, later.
> The code:
>             logging.info('Start - %s' %time.clock())
>             DataFormSet = formset_factory(DataForm, extra=25)
>             logging.info('Formset Class created- %s' %time.clock())
>             formset = DataFormSet(request.POST, request.FILES)
>             logging.info('Created new formset- %s'%time.clock())
>
> From my logs:
> 2009-01-06 22:53:30,671 INFO Start - 0
> 2009-01-06 22:53:30,671 INFO Formset Class created- 0.000403403225829
> 2009-01-06 22:53:34,296 INFO Created new formset- 3.62182316468
>   or later
> 2009-01-06 22:56:37,500 INFO Start - 186.836136716
> 2009-01-06 22:56:37,500 INFO Formset Class created- 186.836445135
> 2009-01-06 22:56:43,108 INFO Created new formset- 192.440754621
>
>
>    Please note that I am running the whole thing under the django
> development server in my laptop itself and not a server.
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to