AS Tk-package broken ? 
Author Message
 AS Tk-package broken ?

Hi,

I just downloaded the actual Tk-package on ActiveStates homepage and
installed it on my system (upgraded the old package).

The old one was the one Tk.pm Version 800.011, the new downloaded one is
800.018

I now see that my application (mainly working with a Text widget (not
TextUndo) is about 5TIMES SLOWER than with the
old package, the Optionmenus do now work correctly as well.

In contrary, the Text widget now has an oppup-menu, which I do not need,
because I provide my own dialogs.

Has anybody made the same experience ? Is it a bug or the general
direction Tk goes (?being slower?) ?

Is there any way (if this slowness is caused by an extra functionality
overhead) to switch off these unneeded features and gain speed again.
Especially iterating over the tags (my widget contains about 300 tags of
mostly short range) seems to be very slow now.
Where can I find the "old" package again, unfortionatly I overwrote the
old one with this new release.

ciao, thomas.

--
----------------------------------------------------
Thomas Schmickl,
Department for zoology
Karl Franzens University Graz, Austria.
----------------------------------------------------
Visit the GPL e:doc-project on http://www.*-*-*.com/

----------------------------------------------------



Mon, 19 Aug 2002 03:00:00 GMT  
 AS Tk-package broken ?

Quote:

> Hi,

> I just downloaded the actual Tk-package on ActiveStates homepage and
> installed it on my system (upgraded the old package).

> The old one was the one Tk.pm Version 800.011, the new downloaded one is
> 800.018

> I now see that my application (mainly working with a Text widget (not
> TextUndo) is about 5TIMES SLOWER than with the
> old package, the Optionmenus do now work correctly as well.

> In contrary, the Text widget now has an oppup-menu, which I do not need,
> because I provide my own dialogs.

> Has anybody made the same experience ? Is it a bug or the general
> direction Tk goes (?being slower?) ?

> Is there any way (if this slowness is caused by an extra functionality
> overhead) to switch off these unneeded features and gain speed again.
> Especially iterating over the tags (my widget contains about 300 tags of
> mostly short range) seems to be very slow now.
> Where can I find the "old" package again, unfortionatly I overwrote the
> old one with this new release.

There were some changes to the Text widget to make it more
editor-like. You can grab the sources of, say, 800.014 from CPAN and
just use Text/Text.pm from the archive. I don't think that there were
any changes to the Tk core in respect to the Text widget, so just
plugging the old Text widget should work. Or, to make it cleaner,
rename the old one to Tk::RawText or Tk::OldText.

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



Mon, 19 Aug 2002 03:00:00 GMT  
 AS Tk-package broken ?
Slaven Rezic schrieb:

Quote:
> There were some changes to the Text widget to make it more
> editor-like. You can grab the sources of, say, 800.014 from CPAN and
> just use Text/Text.pm from the archive. I don't think that there were
> any changes to the Tk core in respect to the Text widget, so just
> plugging the old Text widget should work. Or, to make it cleaner,
> rename the old one to Tk::RawText or Tk::OldText.

Thank you very much, this information makes me smile again. I was very frustrated
yesterday because I have seen
the work of about one years' evenings be vanished. So I am very lucky to here about
that.
I would like to change the name to "Tk::FastText" and distribute it together with
my program. What do I have to do,
so that everything works at my end users (The might have different Perl/Tk
distributions, Linux, Win32, Solaris etc.)

Do I simply have to rename the file and the package of the old "Text" file into
"SpeedText" ?

Aren't there platform-dependend files to, compiled C-libraries etc. ?

These questions might look stupid, but I really haven't understood what parts of
Perl/Tk are made in Perl and what is done in C.

Ciao, thomas.

--
----------------------------------------------------
Thomas Schmickl,
Department for zoology
Karl Franzens University Graz, Austria.
----------------------------------------------------
Visit the GPL e:doc-project on http://members.magnet.at/hfbuch/edoc

----------------------------------------------------



Tue, 20 Aug 2002 03:00:00 GMT  
 AS Tk-package broken ?

Quote:

> Slaven Rezic schrieb:

> > There were some changes to the Text widget to make it more
> > editor-like. You can grab the sources of, say, 800.014 from CPAN and
> > just use Text/Text.pm from the archive. I don't think that there were
> > any changes to the Tk core in respect to the Text widget, so just
> > plugging the old Text widget should work. Or, to make it cleaner,
> > rename the old one to Tk::RawText or Tk::OldText.

> Thank you very much, this information makes me smile again. I was very frustrated
> yesterday because I have seen
> the work of about one years' evenings be vanished. So I am very lucky to here about
> that.
> I would like to change the name to "Tk::FastText" and distribute it together with
> my program. What do I have to do,
> so that everything works at my end users (The might have different Perl/Tk
> distributions, Linux, Win32, Solaris etc.)

> Do I simply have to rename the file and the package of the old "Text" file into
> "SpeedText" ?

Yes, I hope so. You will then say "use Tk::SpeedText;" in your script,
but create the widget as "$mw->Text->pack;". If you like, you can
change the package name to Tk::SpeedText, too, and the "Construct"
line in Text.pm to "SpeedText" (but not the "bootstrap" line!) --- but
this could be probably more work if there are some ->isa('Tk::Text')
calls in the code.

Quote:
> Aren't there platform-dependend files to, compiled C-libraries etc. ?

> These questions might look stupid, but I really haven't understood what parts of
> Perl/Tk are made in Perl and what is done in C.

The perl parts are the same for Unix and Windows. Differences between
the OSes are handled with a $^O or $Tk::platform conditional (grep the
source for examples).

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



Tue, 20 Aug 2002 03:00:00 GMT  
 AS Tk-package broken ?
Slaven Rezic schrieb:

Quote:
> Yes, I hope so. You will then say "use Tk::SpeedText;" in your script,
> but create the widget as "$mw->Text->pack;". If you like, you can
> change the package name to Tk::SpeedText, too, and the "Construct"
> line in Text.pm to "SpeedText" (but not the "bootstrap" line!) --- but
> this could be probably more work if there are some ->isa('Tk::Text')
> calls in the code.

I tried to do this, but I didn't find out how I could keep the File "SpeedText.pm" in my
programs sub-directory. I do not want the enduser
to copy files into the Perl-directory structure, so I would like to keep the file
together with my applications file.
My Aplication is in "c:\edoc", all my widgets are in "c:\edoc\class" and I get them by f.
ex. "use class::NumLabel" im my start-script "edoc.pl"

My tests with the new version of the text widget showed, that the reason why it slows
down my applictaion is that the managing of the text-tags is much more slower now. Did
they some changes in the BTree handeling of the tags ? I could not imagine why the adding
of the popup-menu and some other features could affect such a core-function in the way it
does.

BTW, do you know any method to automatically call a callback when a tag is destroyed. I
tried binding '<Destroy>', but this didn't work.
I am thinking about handeling the Taglist ba myself and creating an extra-object for each
tag and storing the reference to it in the new '-data' option of the tag. But how could I
remove this object from the list if the user deletes it in the text or cuts it into the
clipboard ?

Is there a "changes"-file where you could see what functions are changed from version to
version of each widget ?
I noticed that in the new Tk-package, the function  Text::dlininfo() now produces a
totally different output in wrapped lines, or in the new OptionMenu.pm
the option '-textvariable' was renamed to '-variable'. These are major changes, but I
didn't find any documentation about that changes in "perldoc Tk::Text" or "perldoc
Tk::Optionmenu".

Ciao, thomas

----------------------------------------------------
Thomas Schmickl,
Department for zoology
Karl Franzens University Graz, Austria.
----------------------------------------------------
Visit the GPL e:doc-project on http://members.magnet.at/hfbuch/edoc

----------------------------------------------------



Wed, 21 Aug 2002 03:00:00 GMT  
 AS Tk-package broken ?

Quote:

> Slaven Rezic schrieb:

> > Yes, I hope so. You will then say "use Tk::SpeedText;" in your script,
> > but create the widget as "$mw->Text->pack;". If you like, you can
> > change the package name to Tk::SpeedText, too, and the "Construct"
> > line in Text.pm to "SpeedText" (but not the "bootstrap" line!) --- but
> > this could be probably more work if there are some ->isa('Tk::Text')
> > calls in the code.

> I tried to do this, but I didn't find out how I could keep the File "SpeedText.pm" in my
> programs sub-directory. I do not want the enduser
> to copy files into the Perl-directory structure, so I would like to keep the file
> together with my applications file.
> My Aplication is in "c:\edoc", all my widgets are in "c:\edoc\class" and I get them by f.
> ex. "use class::NumLabel" im my start-script "edoc.pl"

You can create a Tk subdirectory, put the new module in and then say
in your program:

        use FindBin;
        use lib "$FindBin::RealBin";
        ...
        use Tk::SpeedText;

$FindBin::RealBin is the position of the executed program.

- Show quoted text -

Quote:
> My tests with the new version of the text widget showed, that the reason why it slows
> down my applictaion is that the managing of the text-tags is much more slower now. Did
> they some changes in the BTree handeling of the tags ? I could not imagine why the adding
> of the popup-menu and some other features could affect such a core-function in the way it
> does.

> BTW, do you know any method to automatically call a callback when a tag is destroyed. I
> tried binding '<Destroy>', but this didn't work.
> I am thinking about handeling the Taglist ba myself and creating an extra-object for each
> tag and storing the reference to it in the new '-data' option of the tag. But how could I
> remove this object from the list if the user deletes it in the text or cuts it into the
> clipboard ?

> Is there a "changes"-file where you could see what functions are changed from version to
> version of each widget ?
> I noticed that in the new Tk-package, the function  Text::dlininfo() now produces a
> totally different output in wrapped lines, or in the new OptionMenu.pm
> the option '-textvariable' was renamed to '-variable'. These are major changes, but I
> didn't find any documentation about that changes in "perldoc Tk::Text" or "perldoc
> Tk::Optionmenu".

There is a rough Changes.log file in the source distribution. Other
than that, it's best to keep the old sources and be able to do a
"diff".

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



Wed, 21 Aug 2002 03:00:00 GMT  
 
 [ 6 post ] 

 Relevant Pages 

1. Perl 5.001 + Tk: broken demo, broken evaluation?

2. Perl/Tk Packages (Was: RE: (More) Problems Installing Perl/Tk)

3. Tk breaks strict module.

4. Broken fileevent in Tk 800.01x?

5. Multiple bindings & Tk->break problems

6. Does Tk->break work?

7. Tk->break

8. Tk's Makefile.PL utilities broken?

9. ->waitVariable broken in Tk 800.022?

10. Perl/Tk 800.021 LabFrame broken?

11. Tk::MsgBox Broken?

12. Tk::BrowseEntry broken?

 

 
Powered by phpBB® Forum Software