On Fri, Jul 6, 2012 at 7:29 AM, Cal Leeming [Simplicity Media Ltd] <
[email protected]> wrote:
> -1 on removing spaceless.
>
> On pages where you have lots of rows in a loop, the amount of whitespace
> you end up with can massively increase page loading times.
>
> Sure, you could use whitespace stripping middleware I guess, but some
> people prefer not to have that.
>
> I agree that spaceless does make code look a little ugly, but without you
> would end up with people putting big loops on 1 single line, just to avoid
> the whitespace.
>
hm, I wanted to pick your guys' brain again
What prompted my initial email was me trying to get the server response
time down. I guess that's a different than page load time (which feels
to me like a more worthwhile thing to look at if you're trying to make your
site go fast...), but I got assigned a bug to just get the 'response time'
down for this one supposedly slow page etc. etc.
I'm basically just using django-debugtoolbar, looking at that CPU Time row,
and seeing what I can remove or tweak from the template to bring that
number down.
One thing that I found that would bring the *CPU time* down by a bit was
removing the {% spaceless %} tags littered around everywhere in the template
yeah, I wouldn't outright remove it, but maybe just change the docs to say
how it should or should not be used
> Cal
>
>
> On Fri, Jul 6, 2012 at 2:38 PM, Masklinn <[email protected]> wrote:
>
>> On 6 juil. 2012, at 02:29, Micky Hulse <[email protected]> wrote:
>>
>> > On Thu, Jul 5, 2012 at 5:00 PM, Russell Keith-Magee
>> > <[email protected]> wrote:
>> >> Good question. I'm not really sure *what* it's supposed to be used
>> >> for. Trimming whitespace to reduce page size is one possible use; the
>> >
>> > If you develop for IE6, there's the IE6 whitespace bug. One fix, that
>> > I know of, is to remove all whitespace around the HTML.
>> >
>> > I never use the spaceless tag myself, but just thought I would mention
>> > another way one could utilize the tag.
>> >
>>
>> An other use case is that whitespace is significant in parts of HTML: in
>> code blocks of course but also *between inline elements*. In that case,
>> spaceless tends to be more maintainable than removing all white space by
>> hand end getting a single huge line.
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Django users" group.
>> To post to this group, send email to [email protected].
>> To unsubscribe from this group, send email to
>> [email protected].
>> For more options, visit this group at
>> http://groups.google.com/group/django-users?hl=en.
>>
>>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en.