[jQuery] Re: drawing on mousemove - performance problem

2007-10-27 Thread Flesler
http://groups.google.com/group/jquery-dev/browse_thread/thread/cc768c85d5514098?hl=en On Oct 26, 10:48 am, Flesler [EMAIL PROTECTED] wrote: $(function(){ $(document).mousemove(function(e){ draw([ e.pageX, e.pageY ]); }); }); do you really need to generate an array? I

[jQuery] Re: drawing on mousemove - performance problem

2007-10-27 Thread Cloudream
http://labs.cloudream.name/jquery/move.html like this? On Oct 26, 5:57 am, powtac [EMAIL PROTECTED] wrote: Is there a way to reduce the cpu load when I do something like this (and move the pointer very fast on the screen): $(document).mousemove(function(e) { x = e.pageX; y

[jQuery] Re: drawing on mousemove - performance problem

2007-10-26 Thread Flesler
$(function(){ $(document).mousemove(function(e){ draw([ e.pageX, e.pageY ]); }); }); do you really need to generate an array? I suppose draw( e.pageX, e.pageY ); will be a bit faster. On Oct 25, 6:57 pm, powtac [EMAIL PROTECTED] wrote: Is there a way to reduce the cpu load