Stephen, thanks, I was not trying to be confrontational, I just misunderstood
what you said/meant

Karl, thanks for the clarification, i have FB 1.0b1 installed now.

Looking at the profile and following the steps i provided before, I see
where bottlenecking is; I think.

These are the top times for each column, but what one should I be more
concerned with, column wise?

Calls:
has => 13843
getAll => 13174
curCss => 1842

Own time:
has => 1641.71ms
getAll => 1078.838ms
curCSS => 891.214ms

Time:
handle => 561.253ms
jQuery => 3033.253ms
find => 3033.253

Avg:
(no name) => 1157.012ms
drawPloygonMakeDraggable => 1157.012ms
e=> 1157.012ms

min:
(no name) => 1157.012ms
drawPloygonMakeDraggable => 1157.012ms
e=> 1157.012ms

max:
(no name) => 1157.012ms
drawPloygonMakeDraggable => 1157.012ms
e=> 1157.012ms


This function seems to be the heavy hitter:

function drawPolygonMakeDraggable(){
                $('.drawdiv').remove();
                $('.drawdivs').remove();
                $(e).unbind("mousemove");
                $(e).unbind("click");
        $(e).bind("mousemove", function(a){
                putCord((a.clientX-eLeft) +', ' +(a.clientY-eTop))
        });
        var xArray = Array();
        var yArray = Array();
        $.each(cords, function(i){
                xArray.push(this[0]);
                yArray.push(this[1]);
        });
        canvas.drawPolygon(xArray, yArray);
        canvas.fillPolygon(xArray, yArray);
        canvas.paint(); 
        $('.drawdiv').removeClass("drawdiv").addClass("drawdivs").fadeTo("fast",
0.5);
        $(".circle").mousedown(function(){
                isHeld = this;
                $(this).Draggable({
                                zIndex:         1000,
                                ghosting:       false,
                                opacity:        0.7,
                                containment: e,
                                onDrag: changePos,
                                onStop: drawPolygonMakeDraggable
                        });
        });
}


Thanks,


Benjamin Sterling
KenzoMedia.com
Kenzohosting.com
-- 
View this message in context: 
http://www.nabble.com/help-speeding-up-code-tf2914837.html#a8147473
Sent from the JQuery mailing list archive at Nabble.com.


_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/

Reply via email to