Tuesday, February 1, 2011

Re: Storing *big* texts in db fields

Is it possible the wordcount method is slowing everything down? If the
wordcount
is displayed in the table list in the Admin interface, I imagine it
will need to count words
of *every* model instance before showing the table.

If might be worth temporarily disabling the wordcount feature to see
if that helps. If that
is the cause of the slow down, you could store the wordcount as an
attribute on the model
and calculate it when post_save() is signalled - this will be quicker
than counting the words
each time, as they will only be counted when the model is saved/
updated.

> (Which I know because I added a method to the model to calculate the
> wordcount, and have it displayed in the admin list. Which gives me no
> end of pleasure.)
>

--
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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

No comments:

Post a Comment