Tk800.022 BUG?: Slow Tk800.022 compared to Tk800.015 when passing array reference in canvas->bind 
Author Message
 Tk800.022 BUG?: Slow Tk800.022 compared to Tk800.015 when passing array reference in canvas->bind

A program that I originally wrote using Tk800.015 executes incredibly
slowly (1000 X slower) using Tk800.022 (Tk800.019 as well).  It is slow
cross-platform (windows, solaris,linux) and slow whether it is perl
5.005 or perl 5.6.  I have finally spent the time to track down the
offending lines of code in a subroutine. The skeleton of the subroutine
code is shown below.

sub draw {

      $canvas->bind($tagname,"<Button-3>", [\&popup_menu, "$tagname",

     }

Quote:
}

The offending  line is the $canvas->bind.  When  I commented out this
line the program ran as quickly as it does in Tk800.015.  I tried
various changes to the bind command to test the various arguments being
passed.  Changing the subroutine reference of course didn't do
anything.   The change that brought the program  back to normal speed

unbearable slow down even if I passed it via a previously declared


does give me a work around.

But, still I am perplexed by this.   Am I actually doing something
wrong, or is bind doing something that I am unaware of with my
reference?  I'd love to know what is going on.

Thanks,

Jeff
--
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Jeff Bailey
Graduate Student                        lab:     216-368-1887
Eichler Lab                             fax:     216-368-3432

2109 Adelbert Rd
Case Western Reserve University
Cleveland, OH 44106
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=



Sat, 27 Sep 2003 05:03:05 GMT  
 Tk800.022 BUG?: Slow Tk800.022 compared to Tk800.015 when passing array reference in canvas->bind

Quote:

> A program that I originally wrote using Tk800.015 executes incredibly
> slowly (1000 X slower) using Tk800.022 (Tk800.019 as well).  It is slow
> cross-platform (windows, solaris,linux) and slow whether it is perl
> 5.005 or perl 5.6.  I have finally spent the time to track down the
> offending lines of code in a subroutine. The skeleton of the subroutine
> code is shown below.

> sub draw {

>       $canvas->bind($tagname,"<Button-3>", [\&popup_menu, "$tagname",

>      }
> }

Have you tried the same code with "perl" subroutine refs? I.e.

Regards,
        Slaven

--
use Tk;$c=tkinit->Canvas(-he,20)->grid;$x=5;map{s!\n!!g;map{create$c 'line'=>
map{$a=-43+ord;($x+($a>>3)*2=>5+($a&7)*2)}split''}split"!";$x+=12}split/_/=>'K
PI1_+09IPK_K;-OA1_+K!;A__1;Q!7G_1+QK_3CLPI90,_+K!;A_+1!KQ!.N_K+1Q!.F_1+KN.Q__1+
KN._K+1Q!.F_1+KN.Q_+1Q__+1!KQ!.N_1;Q!7G_K3,09Q_+1!K.Q_K+1Q!.F_1+KN.Q_';MainLoop



Sun, 28 Sep 2003 03:00:18 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Patch for scale bug in Tk800.022

2. Scale bug in Tk800.022

3. Installing Tk800.022 on Perl 5.6.0

4. Tk800.022 and ActiveState Perl 5.6

5. Tk800.022 on SuSE7.0 seems OK

6. Tk800.022 and SuSE7.0: Will it work?

7. PerlIO and Tk800.022

8. problem in building Tk800.022

9. Problems installing Tk800.022

10. TK800.022

11. Problem with Tk800.022

12. Problem installing Tk800.022 on RH 6.2

 

 
Powered by phpBB® Forum Software