471,605 Members | 1,338 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,605 software developers and data experts.

Performance of CSS vs HTML

I've written a bunch of REXX edit macros to convert JCL, PL/I, REXX
and SuperC output into a HTML format that very closely mimics the
display of the ISPF editor with "HILITE ON PAREN".

Initially I was quite happy that it would just display the data, but
then I thought "Why not add some ISPF like scrolling to it?" As a
complete novice to HTML, this was not very doable for me, but after
asking around, Derek Patteson of <http://
www.smallofficesolutions.co.uk/was kind enough to produce something
for me for a pretty nominal amount.

Now, the original code works OK and the HTML loads in seconds, even
for the largest file (1.5Mb, 10965 lines) I could create. However, if
I slot the same data into Derek's skeleton, IE's CPU usage goes to
95-99% and rendering takes ages - I 've not even tried this big one.
Derek's code also scales the data to the browser window and a resize
of the window followed by a refresh will take horrible amounts of time
- a 3000 line page has been resizing itself for the past two hours...

I've done some investigating and it seems that the culprit is a 'white-
space:pre' CSS tag - using '<pre>...</pre>' HTML tags will speed up
things tremendously (only can test on IE6 right now), but the '</pre>'
tag insists on adding a space after it (again IE6) which screws up the
last line of the display.

My question is, is this difference between using CSS & HTML normal and
how, if possible, can I do something about it?

Robert

Sep 11 '07 #1
8 1744
prino wrote:
>
Derek Patteson of <http://www.smallofficesolutions.co.uk/was kind
enough to produce something for me for a pretty nominal amount.
Well, without a URL to the page you're actually talking about, all I can
say is that based on *this* URL, I wouldn't get my hopes up for quality
coding. The page/site looks rather ... nominal.
>
I've done some investigating and it seems that the culprit is a 'white-
space:pre' CSS tag - using '<pre>...</pre>' HTML tags will speed up
things tremendously (only can test on IE6 right now),
Well, you're ahead of us. ;-)
but the '</pre>' tag insists on adding a space after it (again IE6)
which screws up the last line of the display.
Even with pre {margin-bottom:0;} in the CSS?
>
My question is, is this difference between using CSS & HTML normal and
how, if possible, can I do something about it?
To be a bit pedantic, one doesn't use *either* HTML or CSS; the CSS is
nothing without some markup for it to apply to. It's possible to use
HTML with adding any CSS (although browsers may have a default
stylesheet), but it doesn't go the other way.

I've never seen any huge hit strictly from adding some necessary styles.
I _have_ seen some ridiculously large stylesheets which overspecify
things and create a burden on the whole process. Show us some URLs (you
said you had some original code and HTML, and then there's a new page
with CSS) so we can discuss in an informed way.
--
John
Pondering the value of the UIP: http://improve-usenet.org/
Sep 11 '07 #2
On 11 Sep, 15:39, John Hosking <J...@DELETE.Hosking.name.INVALID>
wrote:
Well, without a URL to the page you're actually talking about, all I can
say is that based on *this* URL, I wouldn't get my hopes up for quality
coding. The page/site looks rather ... nominal.
But, but,
"We are proud to be working toward Quality Certification to ISO9001
(2000) standard"
8-)

If I ever needed an example to support the "all valid CSS sites look
boring and boxy" canard, then I might use that site. Except that it's
not valid.

Sep 27 '07 #3
prino wrote:
On Sep 11, 4:39 pm, John Hosking <J...@DELETE.Hosking.name.INVALID>
wrote:
>prino wrote:
>>Derek Patteson of <http://www.smallofficesolutions.co.uk/was kind
enough to produce something for me for a pretty nominal amount.
Well, without a URL to the page you're actually talking about, all I can
say is that based on *this* URL, I wouldn't get my hopes up for quality
coding. The page/site looks rather ... nominal.
>>I've done some investigating and it seems that the culprit is a 'white-
space:pre' CSS tag - using '<pre>...</pre>' HTML tags will speed up
things tremendously (only can test on IE6 right now),
Well, you're ahead of us. ;-)
>> but the '</pre>' tag insists on adding a space after it (again IE6)
which screws up the last line of the display.
Even with pre {margin-bottom:0;} in the CSS?
>>My question is, is this difference between using CSS & HTML normal and
how, if possible, can I do something about it?

OK, here is the code:

=== CUT ===
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://
<snip tons 'o code>

Incredible! It is amazing how the meaning of three little letters can
elude so many folks! Especially folks via GG that cannot seem to use
Google! Okay prino, I'll help you out.
http://www.google.com/search?hl=en&q...=Google+Search
define:URL - Google Search
--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com
Sep 27 '07 #4
On 27 Sep, 14:46, prino <pr...@bigfoot.comwrote:
font:normal 48px/52px courier new;
Just WT_F_ are you trying to do here?

These people are incompetents and their web design is worthless. Throw
it away.

Also learn what "post a URL means", lest we regard you as equally
clueless.

Sep 27 '07 #5
On Sep 27, 5:22 pm, "Jonathan N. Little" <lws4...@centralva.net>
wrote:
prino wrote:
On Sep 11, 4:39 pm, John Hosking <J...@DELETE.Hosking.name.INVALID>
wrote:
prino wrote:
>Derek Patteson of <http://www.smallofficesolutions.co.uk/was kind
enough to produce something for me for a pretty nominal amount.
Well, without a URL to the page you're actually talking about, all I can
say is that based on *this* URL, I wouldn't get my hopes up for quality
coding. The page/site looks rather ... nominal.
>I've done some investigating and it seems that the culprit is a 'white-
space:pre' CSS tag - using '<pre>...</pre>' HTML tags will speed up
things tremendously (only can test on IE6 right now),
Well, you're ahead of us. ;-)
> but the '</pre>' tag insists on adding a space after it (again IE6)
which screws up the last line of the display.
Even with pre {margin-bottom:0;} in the CSS?
>My question is, is this difference between using CSS & HTML normal and
how, if possible, can I do something about it?
OK, here is the code:
=== CUT ===
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://

<snip tons 'o code>

Incredible! It is amazing how the meaning of three little letters can
elude so many folks! Especially folks via GG that cannot seem to use
Google! Okay prino, I'll help you out.
Ever thought about the fact that the poster may not have a personal
website and that the code shown comes from an intranet page? This code
has been dumped in my lap and whereas I've worked with PL/I & REXX for
about two decades, CSS and Javascript (and to a lesser extent) are
still mostly completely foreign to me.

FWIW, as I mentioned in the very first post of this thread, the code
posted works absolutely flawlessly in Firefox, on a slow (1.3 GHz)
notebook the largest page I can throw at it (almost 11,000 lines of
HTML'ised PL/I, around 1.5Mb) renders in around 10 seconds. The
problem is IE6, which seems incapable of handling 'white-space:pre'
and that's why I tried to use '<pre>...</pre>' instead, which works,
but messes up the display.

Robert

Sep 28 '07 #6
Rob
prino schreef:
Ever thought about the fact that the poster may not have a personal
website and that the code shown comes from an intranet page?
Maybe you could ask the folks in
comp.infosystems.intranet.authoring.stylesheets
--
Rob
Sep 28 '07 #7
prino wrote:
On Sep 27, 5:22 pm, "Jonathan N. Little" <lws4...@centralva.net>
wrote:
>Incredible! It is amazing how the meaning of three little letters can
elude so many folks! Especially folks via GG that cannot seem to use
Google! Okay prino, I'll help you out.

Ever thought about the fact that the poster may not have a personal
website and that the code shown comes from an intranet page? This code
has been dumped in my lap and whereas I've worked with PL/I & REXX for
about two decades, CSS and Javascript (and to a lesser extent) are
still mostly completely foreign to me.
We never heard that on before. Try Google again:

http://www.google.com/search?hl=en&q...=Google+Search
free web hosting - Google Search

And put up a sample page, then list a URL! Don't post tons 'o code.

--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com
Sep 28 '07 #8
prino wrote:
>
Ever thought about the fact that the poster may not have a personal
website and that the code shown comes from an intranet page?
Ever thought that we haven't heard that story about a million times
already? What makes your situation different from any of them?

This isn't a help desk, but if you want to use it as one, then make it
as easy as possible for us to help you. Posting code is not the way.
Posting a URL is. That's the accepted convention of this group, like it
or not.
This code has been dumped in my lap
Sorry, but that's not really our problem.

--
Berg
Sep 29 '07 #9

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

8 posts views Thread by Sebastian Werner | last post: by
115 posts views Thread by Mark Shelor | last post: by
7 posts views Thread by Nelson | last post: by
18 posts views Thread by koorb | last post: by
11 posts views Thread by Richard Maher | last post: by
1 post views Thread by XIAOLAOHU | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.