Closed Bug 93766 Opened 23 years ago Closed 23 years ago

No reflows caused when drawing HTML using JavaScript

Categories

(Core :: DOM: Core & HTML, defect)

x86
Windows 2000
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: neil, Assigned: jst)

References

Details

Attachments

(1 file)

If I run this simple HTML in Mozilla it locks it up for a very long time (Long 
enough to disconnect me from chatzilla due to a ping timeout).  In IE it only 
locks it up for a couple seconds.

Shouldn't this cause a couple reflows?  or at least come up for air?

<html>
 <head>
 </head>
 <body>
  <script language="Javascript">
   for ( var y = 0; y < 4; y++ ) {
      for ( var n = 0; n < 256; n++ ) {
         document.write('<img src="7.jpg">');
      }
   }
  </script>
 </body>
</html>

If I do exactly the same thing, but with 1024 <img> tags in normal HTML, I see 
it right away.
Over to DOM0
Assignee: rogerl → jst
Status: UNCONFIRMED → NEW
Component: Javascript Engine → DOM Level 0
Ever confirmed: true
QA Contact: pschwartau → desale
I'm making this bug block 21762 because it appears to be a dhtml issue.
Blocks: 21762
Is this still an issue?  It takes me about 2 seconds to run this testcase on a
decently large (800x730) jpeg and about the same for a similarly sized gif.  I
tried bumping up the number of iteration by a factor of 4 and profiling.  I'll
attach the profile, but nothing seems out of place there.

The key issue here, I suspect, is that the UI runs on the same thread as scripts
in webpages...
Seems pretty darn fast now, marking WORKSFORME. Please reopen if this is still
an issue.
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → WORKSFORME
No longer blocks: 21762
Blocks: 21762
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: