Connecting Tech Pros Worldwide Help | Site Map

Disable DOM construction

 
LinkBack Thread Tools Search this Thread
  #1  
Old July 23rd, 2005, 09:34 PM
Rick
Guest
 
Posts: n/a
Default Disable DOM construction


Hi,

We need to generate a huge HTML page (only TABLE/TR/TD structure), for
a size of 5 Mo. The problem is when IE receive this html source, it
try to build a DOM with it. As result, it could be very long to
display the HTML page to the client.

Could we disable the DOM construction in IE?

Thanks!


  #2  
Old July 23rd, 2005, 09:34 PM
Martin Honnen
Guest
 
Posts: n/a
Default Re: Disable DOM construction



Rick wrote:
[color=blue]
> Could we disable the DOM construction in IE?[/color]

If you disable scripting in IE then it does not build a DOM.

--

Martin Honnen
http://JavaScript.FAQTs.com/
  #3  
Old July 23rd, 2005, 09:34 PM
Rick
Guest
 
Posts: n/a
Default Re: Disable DOM construction


Thanks but we don't want to disable Javascript for all the pages in our
site, but only for this specific page...

Thx

Martin Honnen wrote:[color=blue]
> Rick wrote:
>[color=green]
> > Could we disable the DOM construction in IE?[/color]
>
> If you disable scripting in IE then it does not build a DOM.
>
> --
>
> Martin Honnen
> http://JavaScript.FAQTs.com/[/color]

  #4  
Old July 23rd, 2005, 09:34 PM
Csaba Gabor
Guest
 
Posts: n/a
Default Re: Disable DOM construction

Martin Honnen wrote:[color=blue]
> If you disable scripting in IE then it does not build a DOM.[/color]

I find this statement interesting. Is it documented?

If I disable scripting (set Security Level high under Tools/Internet
Options/Security/Local Computer - this is with IE 6 under Win XP Pro,
SP 2) for the local computer and open the following c:\tmp\delme.htm
file then the second text shows black, consistent with your claim:

<html><head><title>DOM test</title></head>
<body>
<div style="color:blue" id="mydiv">Hi mom</div>
<div id="div2"
style="color:expression(document.getElementById('m ydiv').style.color)"[color=blue]
>Hi dad</div>[/color]
</body>
</html>

However, if I introduce delme.vbs as below, then the second text will
be colored blue, too. This doesn't necessarily contradict your claim
because it may be VBScript that is building the DOM, but I am mighty
suspicious because it is IE that is doing the rendering. How say you,
Martin?

set ie=createobject("InternetExplorer.application")
ie.visible = true
ie.navigate2 "c:\tmp\delme.htm"
while ie.readystate<>4: wscript.sleep 10: wend
set div2 = ie.document.getElementById("div2")
div2.style.color = "blue"

Csaba Gabor from Vienna

  #5  
Old July 23rd, 2005, 09:34 PM
VK
Guest
 
Posts: n/a
Default Re: Disable DOM construction



Rick wrote:[color=blue]
> Hi,
>
> We need to generate a huge HTML page (only TABLE/TR/TD structure), for
> a size of 5 Mo. The problem is when IE receive this html source, it
> try to build a DOM with it. As result, it could be very long to
> display the HTML page to the client.
>
> Could we disable the DOM construction in IE?
>
> Thanks![/color]

Specially for such cases (more precisely - for their databound tables)
Microsoft has table-layout style attrubute.

So if you set table style:
table { table-layout: fixed}

IE will display new row as soon as it has data for it. By my
observation (not microtimed though) in this case the display speed is
proportional to the data stream speed.

  #6  
Old July 23rd, 2005, 09:34 PM
Martin Honnen
Guest
 
Posts: n/a
Default Re: Disable DOM construction



Csaba Gabor wrote:
[color=blue]
> Martin Honnen wrote:
>[color=green]
>>If you disable scripting in IE then it does not build a DOM.[/color]
>
>
> I find this statement interesting. Is it documented?[/color]

No, I was guessing and should have said so.
And your thinking that while scripting inside the page can be disabled
nevertheless someone might automate IE with script from the outside is
correct and therefore you are right, the DOM is build nevertheless as it
looks.



--

Martin Honnen
http://JavaScript.FAQTs.com/
  #7  
Old July 23rd, 2005, 09:35 PM
Richard Cornford
Guest
 
Posts: n/a
Default Re: Disable DOM construction

Martin Honnen wrote:[color=blue]
> Csaba Gabor wrote:[color=green]
>> Martin Honnen wrote:
>>[color=darkred]
>>>If you disable scripting in IE then it does not build a DOM.[/color]
>>
>> I find this statement interesting. Is it documented?[/color]
>
> No, I was guessing and should have said so.
> And your thinking that while scripting inside the page can be
> disabled nevertheless someone might automate IE with script
> from the outside is correct and therefore you are right, the
> DOM is build nevertheless as it looks.[/color]

In principle a web browser must have an internal (software)
representation of the HTML just in order to display/present its
contents. Given modern software design the odds have go to be good that
that representation is a collection of co-operating objects (probably
C++ objects) that represent an object model themselves. The question
would then be the extent to which the object model that interacts with
scripts was something separate from (or parallel to) the object model
that the browser employed itself, or whether scripting just exposed an
interface to that object model. In the latter case the scriptable object
model would always be there regardless of whether it was scripted and in
the former case its creation may not be necessary whenever it could not
be scripted (but there would be no way of knowing/testing).

Given a sufficiently large page, and particularly a sufficiently large
table, I would not expect much improvement in load/display time to be
apparent either way. Working out just the layout for a table is a long
way form being trivial (worse if the browser is attempting progressive
rendering), and there must be some representation of the table in order
to do so.

Richard.


  #8  
Old July 26th, 2005, 06:25 AM
Rick
Guest
 
Posts: n/a
Default Re: Disable DOM construction

Thanks guys,

But we have already save the HTML page as a HTML file on disk (to
remove streaming delay) and when we re-open it, it take a long time too
(at least 30 secs for 5megs). We have try with a file of 2 and 5 megs
and it's very long even if it take time to display, I'm sure the major
part still the DOM construction. I will try your fixed table as css,
to look if it reduce time to display...

Thx

  #9  
Old July 27th, 2005, 03:05 PM
VK
Guest
 
Posts: n/a
Default Re: Disable DOM construction

Rick wrote:[color=blue]
> Thanks guys,
>
> But we have already save the HTML page as a HTML file on disk (to
> remove streaming delay) and when we re-open it, it take a long time too
> (at least 30 secs for 5megs). We have try with a file of 2 and 5 megs
> and it's very long even if it take time to display, I'm sure the major
> part still the DOM construction. I will try your fixed table as css,
> to look if it reduce time to display...
>
> Thx[/color]

Thinking over, nothing you can do while working with it as with one
file. I had to work with C# libraries text dumps (over 18,000 entries)
in both IE and Word and it was damn slow on 2Gh/512Mb.

It's just as it is: a 5-10 Mb doc cannot be displayed *immediately*,
unless you get on hold of Cray. Bu it will be problematic to supply a
Cray station to each of your customers ;-)

If we accept the point that no one needs the entire >5Mb *at once* then
there are some variants. Did you hear about tabular data binding? It's
still all on the client side, no server involved.

 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,989 network members.