I have to agree with Andrea. If it works in all browsers at full
speed, and in IE at only half speed, then there's not much point of
creating all this extra work just for IE. If drag and drop is the
problem, I'd suggest changing just that part to up the performance.

I ran some tests, although they are by no means guaranteed to be fair
tests. I'll let you judge that. The tests change the html of a
paragraph element 50 times in a loop. This whole test is then repeated
5 times to allow averages to be seen. This test set is done twice,
once for jQuery's method, and once for normal javascript.

jQuery: $("p").html("weee");
Javascript: document.getElementsByTagName("p")[0].innerHTML = "weee";

LINK: http://pldilley.googlepages.com/tests.html

RESULTS:
Firefox, Around 23 ms for jQuery, around 5 ms for javascript
IE 8, Around 62 ms for jQuery, around 15 ms for javascript
Opera 10, Around 16 ms for jQuery, 0 ms for javascript

I'll let others test the other browsers. As you can clearly see, IE
itself is much slower in processing javascript. This no doubt adds up
significantly when it comes to jQuery's methods.

CODE:
<html>
<head><title>Test</title></head>
<body>
<p>weee</p>
The jQuery tests:<br>
<script src='jquery-1.3.2.js'></script>

<script>
var a = "";
var b = "";
var c = "";

// jQuery tests
for (j=0;j<5;j++) {
        a = new Date().getTime();
        for (i=0;i<50;i++) {
                $("p").html("weee");
        }
        b = new Date().getTime();
        document.write((b - a) + " milliseconds<br>");
}

document.write("<br>The non-jQuery tests:<br>");

// non-jQuery tests
for (j=0;j<5;j++) {
        a = new Date().getTime();
        for (i=0;i<50;i++) {
                document.getElementsByTagName("p")[0].innerHTML = "weee";
        }
        b = new Date().getTime();
        document.write((b - a) + " milliseconds<br>");
}
</script>
</body>
</html>

-- Paul
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"jQuery Development" group.
To post to this group, send email to jquery-dev@googlegroups.com
To unsubscribe from this group, send email to 
jquery-dev+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/jquery-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to