Closed
Bug 70328
Opened 24 years ago
Closed 24 years ago
Absolute positioning of <div> using javascript is slow
Categories
(Core :: DOM: Core & HTML, defect, P4)
Core
DOM: Core & HTML
Tracking
()
mozilla1.0
People
(Reporter: gregory, Assigned: jst)
References
()
Details
(Keywords: perf)
Attachments
(1 file)
2.41 KB,
text/html
|
Details |
This is really a testcase in search of a bug, but I hope it might be useful to someone. I used very informal benchmarking to test the above URL in both Mozilla 2001022311 and IE5.5sp1. Mozilla used 2X as much processor time moving the News <div> around the screen. All the time is spent in the mousemove() function which is only 3 lines long. I figured this would be a good test case someone could profile against. I suspect the text hilighting code, but it could be the JS engine also. Only way to know is to profile it. I did remove the text from the <div> with the mousedown event. This did reduce processor usage by 20% as there was no text to hilight. However, I think that the browser is still checking to see if text needs to be hilighted and therfore slowing things down.
Comment 1•24 years ago
|
||
Comment 2•24 years ago
|
||
This is a really interesting testcase! Here is the function mousemove() that Greg pointed out above: function mousemove(evt) { var myEvent = evt; if (document.all) myEvent = event; if(!(varmousedown == 0)) { document.getElementById("counter").style.left = myEvent.clientX-varmousedown; document.getElementById("counter").style.top = myEvent.clientY-10; } } I'm going to presume this is a DOM issue, and reassign. I don't have the necessary profiling application to know for sure; if it is actually JS Engine, please reassign back - thanks
Assignee: rogerl → jst
Status: UNCONFIRMED → NEW
Component: Javascript Engine → DOM Level 0
Ever confirmed: true
QA Contact: pschwartau → desale
Assignee | ||
Comment 3•24 years ago
|
||
The problem described in bug 64516 also shows up on this page but there might be more to this one than there is to the other one, I doubt it's a DOM problem tho...
Assignee | ||
Comment 5•24 years ago
|
||
Since this one is newer than bug 69354 I'm marking this aa dup of that bug. *** This bug has been marked as a duplicate of 69354 ***
Status: NEW → RESOLVED
Closed: 24 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•