"wm deiconify" is sometimes really slow 
Author Message
 "wm deiconify" is sometimes really slow

I have an application running in tcl/tk 8.3.3 on windows 98.
Sometimes I run the application and it works perfectly as expected, other
times the windows take ages (like 2.5 seconds) to open.

I have isolated the delay to the "wm deiconify" command. The window icon
appears in the task bar at the bottom of the screen and sometimes the window
appears half drawn (eg: title bar and window border) but the window doesn't
display for another couple of seconds.

It's sporadic behaviour is causing concern. Any ideas?

Also, sometimes I have the application running then I click on another
(non-tcl) program which is overlaying the previous window and I get a "this
application has caused an illegal operation" error with a reference to
module "tk83.dll".

Both of these problems also existed in tcl8.3.2.

If nobody has any ideas I would like to look at the tk source for the "wm
deiconify" command and any other related code so I can perhaps debug the
core, any pointers on which source code to look at would be appreciated
also.



Mon, 13 Oct 2003 10:12:55 GMT  
 "wm deiconify" is sometimes really slow
This is an old problem and you'll find it in the bug tracker and has been
reported plenty of times in the c.l.t. archives. Either Jeff Hobbs or Erik
Melski said that it was due to a bug in the window manager (It only occurs
on some window managers in Unix - particularly the Open Source ones), but
I'm not entirely convinced from the explanation he gave me. The fact that
it also happens on Windows  98 means that something really ought to be done
about it (even if it is a bug in the window manager).

Does it happen on every call to "wm deiconify"?

The only workaround I know of is to avoid using "wm deiconify" all together.

Morten

Quote:

> I have an application running in tcl/tk 8.3.3 on windows 98.
> Sometimes I run the application and it works perfectly as expected, other
> times the windows take ages (like 2.5 seconds) to open.

> I have isolated the delay to the "wm deiconify" command. The window icon
> appears in the task bar at the bottom of the screen and sometimes the
> window appears half drawn (eg: title bar and window border) but the window
> doesn't display for another couple of seconds.

> It's sporadic behaviour is causing concern. Any ideas?

> Also, sometimes I have the application running then I click on another
> (non-tcl) program which is overlaying the previous window and I get a
> "this application has caused an illegal operation" error with a reference
> to module "tk83.dll".

> Both of these problems also existed in tcl8.3.2.

> If nobody has any ideas I would like to look at the tk source for the "wm
> deiconify" command and any other related code so I can perhaps debug the
> core, any pointers on which source code to look at would be appreciated
> also.



Tue, 14 Oct 2003 01:53:16 GMT  
 "wm deiconify" is sometimes really slow
Maybe it is a bug in the window manager... but from what I've been
able to deduce, it seems that Tk has issues (whatever the root cause)
with the ordering stack of windows.

Could be unrelated to this problem... it's just something I've
observed.

Regards,
Chris

Quote:

> This is an old problem and you'll find it in the bug tracker and has been
> reported plenty of times in the c.l.t. archives. Either Jeff Hobbs or Erik
> Melski said that it was due to a bug in the window manager (It only occurs
> on some window managers in Unix - particularly the Open Source ones), but
> I'm not entirely convinced from the explanation he gave me. The fact that
> it also happens on Windows  98 means that something really ought to be done
> about it (even if it is a bug in the window manager).

> Does it happen on every call to "wm deiconify"?

> The only workaround I know of is to avoid using "wm deiconify" all together.

> Morten


> > I have an application running in tcl/tk 8.3.3 on windows 98.
> > Sometimes I run the application and it works perfectly as expected, other
> > times the windows take ages (like 2.5 seconds) to open.

> > I have isolated the delay to the "wm deiconify" command. The window icon
> > appears in the task bar at the bottom of the screen and sometimes the
> > window appears half drawn (eg: title bar and window border) but the window
> > doesn't display for another couple of seconds.

> > It's sporadic behaviour is causing concern. Any ideas?

> > Also, sometimes I have the application running then I click on another
> > (non-tcl) program which is overlaying the previous window and I get a
> > "this application has caused an illegal operation" error with a reference
> > to module "tk83.dll".

> > Both of these problems also existed in tcl8.3.2.

> > If nobody has any ideas I would like to look at the tk source for the "wm
> > deiconify" command and any other related code so I can perhaps debug the
> > core, any pointers on which source code to look at would be appreciated
> > also.



Tue, 14 Oct 2003 03:27:32 GMT  
 "wm deiconify" is sometimes really slow
When tcl is behaving badly it happens on every call to "wm deiconify".
When tcl is ok it works fine on every call, ie: I would need to close the
application then probably do some other things in windows before restarting
the application - then it would be slow again.

I use "wm deiconify" so that the window is displayed nicely formatted to the
user, without it (wm withdraw, deiconify) the window displays to the user in
several stages as it is built, looking very messy.



Quote:
> This is an old problem and you'll find it in the bug tracker and has been
> reported plenty of times in the c.l.t. archives. Either Jeff Hobbs or Erik
> Melski said that it was due to a bug in the window manager (It only occurs
> on some window managers in Unix - particularly the Open Source ones), but
> I'm not entirely convinced from the explanation he gave me. The fact that
> it also happens on Windows  98 means that something really ought to be
done
> about it (even if it is a bug in the window manager).

> Does it happen on every call to "wm deiconify"?

> The only workaround I know of is to avoid using "wm deiconify" all
together.

> Morten


> > I have an application running in tcl/tk 8.3.3 on windows 98.
> > Sometimes I run the application and it works perfectly as expected,
other
> > times the windows take ages (like 2.5 seconds) to open.

> > I have isolated the delay to the "wm deiconify" command. The window icon
> > appears in the task bar at the bottom of the screen and sometimes the
> > window appears half drawn (eg: title bar and window border) but the
window
> > doesn't display for another couple of seconds.

> > It's sporadic behaviour is causing concern. Any ideas?

> > Also, sometimes I have the application running then I click on another
> > (non-tcl) program which is overlaying the previous window and I get a
> > "this application has caused an illegal operation" error with a
reference
> > to module "tk83.dll".

> > Both of these problems also existed in tcl8.3.2.

> > If nobody has any ideas I would like to look at the tk source for the
"wm
> > deiconify" command and any other related code so I can perhaps debug the
> > core, any pointers on which source code to look at would be appreciated
> > also.



Tue, 14 Oct 2003 05:52:38 GMT  
 "wm deiconify" is sometimes really slow

Quote:

> This is an old problem and you'll find it in the bug tracker and has been
> reported plenty of times in the c.l.t. archives. Either Jeff Hobbs or Erik
> Melski said that it was due to a bug in the window manager (It only occurs
> on some window managers in Unix - particularly the Open Source ones), but
> I'm not entirely convinced from the explanation he gave me. The fact that
> it also happens on Windows  98 means that something really ought to be done
> about it (even if it is a bug in the window manager).

Peter's problem is totally unrelated to the one on Unix (which only
happens with certain Linux-offspring wm's).  That's for certain,
because the wm code is almost completely separate on each platform
(and for sure the problem above).

--
  Jeff Hobbs                     The Tcl Guy
  Senior Developer               http://www.ActiveState.com/
      Tcl Support and Productivity Solutions



Tue, 14 Oct 2003 11:31:47 GMT  
 "wm deiconify" is sometimes really slow

Quote:

> I have an application running in tcl/tk 8.3.3 on windows 98.
> Sometimes I run the application and it works perfectly as expected, other
> times the windows take ages (like 2.5 seconds) to open.

Are you sure this isn't due to context switching?  What kind of
machine do you have (specs)?  I can see that happening with
Outlook when it's been paged out.

Quote:
> I have isolated the delay to the "wm deiconify" command. The window icon
> appears in the task bar at the bottom of the screen and sometimes the window
> appears half drawn (eg: title bar and window border) but the window doesn't
> display for another couple of seconds.

> It's sporadic behaviour is causing concern. Any ideas?

> Also, sometimes I have the application running then I click on another
> (non-tcl) program which is overlaying the previous window and I get a "this
> application has caused an illegal operation" error with a reference to
> module "tk83.dll".

> Both of these problems also existed in tcl8.3.2.

> If nobody has any ideas I would like to look at the tk source for the "wm
> deiconify" command and any other related code so I can perhaps debug the
> core, any pointers on which source code to look at would be appreciated
> also.

In any case, if you don't have a C compiler, I'd be willing to
send you a debug 8.3.3 build to try.  I've not had any other
reports like this for Windows 'wm deiconify'.

--
  Jeff Hobbs                     The Tcl Guy
  Senior Developer               http://www.ActiveState.com/
      Tcl Support and Productivity Solutions



Tue, 14 Oct 2003 11:33:24 GMT  
 "wm deiconify" is sometimes really slow
On Thu, 26 Apr 2001 19:53:16 +0200, Morten Skaarup Jensen

Quote:

>This is an old problem and you'll find it in the bug tracker and has been
>reported plenty of times in the c.l.t. archives. Either Jeff Hobbs or Erik
>Melski said that it was due to a bug in the window manager (It only occurs
>on some window managers in Unix - particularly the Open Source ones), but
>I'm not entirely convinced from the explanation he gave me. The fact that
>it also happens on Windows  98 means that something really ought to be done
>about it (even if it is a bug in the window manager).

>Does it happen on every call to "wm deiconify"?

>The only workaround I know of is to avoid using "wm deiconify" all together.

>Morten

If anyone bothered by this 2-second delay wants you can try my hacked
version of tkUnixWm.c for Tk 8.3.2. It totally eliminates the delay
under KWM (the KDE window manager).

http://persweb.direct.ca/dbaker/tkUnixWm.zip

-- Tim Baker



Tue, 14 Oct 2003 13:51:51 GMT  
 "wm deiconify" is sometimes really slow

Quote:

> If anyone bothered by this 2-second delay wants you can try my hacked
> version of tkUnixWm.c for Tk 8.3.2. It totally eliminates the delay
> under KWM (the KDE window manager).

> http://persweb.direct.ca/dbaker/tkUnixWm.zip

Great, I'll try to fuse it into my Tk 8.4a2 as I use KWM as well.
Have you tried submitting this to the main Tcl/Tk distribution or is it too
crude a hack to be worthy of this :o)

Morten



Tue, 14 Oct 2003 16:06:51 GMT  
 "wm deiconify" is sometimes really slow
On Fri, 27 Apr 2001 10:06:51 +0200, Morten Skaarup Jensen

Quote:


>> If anyone bothered by this 2-second delay wants you can try my hacked
>> version of tkUnixWm.c for Tk 8.3.2. It totally eliminates the delay
>> under KWM (the KDE window manager).

>> http://persweb.direct.ca/dbaker/tkUnixWm.zip

>Great, I'll try to fuse it into my Tk 8.4a2 as I use KWM as well.
>Have you tried submitting this to the main Tcl/Tk distribution or is it too
>crude a hack to be worthy of this :o)

>Morten

I'm sure I posted this some months ago, but I can't find it using the
Google search engine. My message was called "2 seconds of hell" or
somthing but it is nowhere to be found. Someone said that this was
just a workaround, but I think it contains 1 or 2 valid bug fixes.

-- Tim Baker



Wed, 15 Oct 2003 04:27:57 GMT  
 "wm deiconify" is sometimes really slow

Quote:

> I have an application running in tcl/tk 8.3.3 on windows 98.
> Sometimes I run the application and it works perfectly as expected, other
> times the windows take ages (like 2.5 seconds) to open.
> ....

Peter,

I've been experiencing a slow display at several occasions. A trick
which improves display speed also gives information about the possible
causes of delay:

I've made a habit of letting precede any 'wm deiconify' command with a
call to 'update'. This often resulted in a much faster window mapping,
indicating that in the slow cases some building of window information
was still going at the time when displaying had started already.
(I've also been experimenting with an 'update idletasks' right after the
'wm deiconify', but am not sure about its effects).

I can't conclude from your posting whether this information is relevant
for your situation, but thought I'd better mention it anyway.

While applying the method above consequently, I still experience some
slow window mapping if toplevels consist of many sub-widgets (say 30 or
more entry-widgets, buttons, labels or whatever, accompanied by several
frames to organize them, lets say approximately 8-10). I've not been
able to improve this.
Please note that many of the widgets I've been using are Iwidgets. I've
read somewhere that Iwidgets show some inherent pace problems, that
probably cannot be attributed to 'wm deiconify'. However, I'm not sure
whether this information is to-the-point because (as far as I
understand), the Iwidgets-slowness should only relate to the building of
the window-information; it should *not* relate to the process of
actually displaying them on screen.

Furthermore I'm not quite sure whether what I'm observing is just the
speed limit of an interpreted language, in which case one cannot expect
very much improvement.

Everything described here concerns Tcl8.3.2 under Win98, but can be seen
equally well under Linux, both on a Intel Pentium II machine.

Greetings,

Erik Leunissen.
=======================

Quote:
> I have isolated the delay to the "wm deiconify" command. The window icon
> appears in the task bar at the bottom of the screen and sometimes the window
> appears half drawn (eg: title bar and window border) but the window doesn't
> display for another couple of seconds.

> It's sporadic behaviour is causing concern. Any ideas?

> Also, sometimes I have the application running then I click on another
> (non-tcl) program which is overlaying the previous window and I get a "this
> application has caused an illegal operation" error with a reference to
> module "tk83.dll".

> Both of these problems also existed in tcl8.3.2.

> If nobody has any ideas I would like to look at the tk source for the "wm
> deiconify" command and any other related code so I can perhaps debug the
> core, any pointers on which source code to look at would be appreciated
> also.

--

Le coeur a ses raisons, que la raison ne conna?t pas.

Blaise Pascal.



Wed, 15 Oct 2003 18:15:27 GMT  
 "wm deiconify" is sometimes really slow

Quote:

> I'm sure I posted this some months ago, but I can't find it using the
> Google search engine. My message was called "2 seconds of hell" or
> somthing but it is nowhere to be found. Someone said that this was
> just a workaround, but I think it contains 1 or 2 valid bug fixes.

Workaround or not, that 2 second delay really makes software written in
Tcl/Tk look very crude on Linux, which is a shame, since Linux is or could
be a big market for Tcl/Tk. If your fix doesn't give problems with other
WM's, then I feel it ought to go into the CVS repository. It certainly
worked for me with Tcl/Tk 8.4a2
I'm not sure which TCT members are Linux users, but they'd be the ones to
submit it to. It really seems like an overkill to submit a TIP for
something like this.

Morten



Thu, 16 Oct 2003 05:53:00 GMT  
 "wm deiconify" is sometimes really slow

Quote:

>> I'm sure I posted this some months ago, but I can't find it using the
>> Google search engine. My message was called "2 seconds of hell" or
>> somthing but it is nowhere to be found. Someone said that this was
>> just a workaround, but I think it contains 1 or 2 valid bug fixes.
> Workaround or not, that 2 second delay really makes software written in
> Tcl/Tk look very crude on Linux, which is a shame, since Linux is or could
> be a big market for Tcl/Tk. If your fix doesn't give problems with other
> WM's, then I feel it ought to go into the CVS repository. It certainly
> worked for me with Tcl/Tk 8.4a2
> I'm not sure which TCT members are Linux users, but they'd be the ones to
> submit it to. It really seems like an overkill to submit a TIP for
> something like this.

This has been a common subject for us Perl folks.  KDE seems to be the culprit,
as determined by these seat-of-the-pants programs.  Let us know what you find:

#!/usr/local/bin/wish
regexp {^([1234567890])+} [time {raise .} 10] us
puts "[expr $us * 10 / 1000000.0] seconds, Tcl/Tk $tcl_patchLevel \
        $tcl_platform(os) $tcl_platform(osVersion) $tcl_platform(machine) \
        $tcl_platform(platform)"
exit

#!/usr/local/bin/perl
use Tk;
$mw=tkinit; $t = Tk::timeofday();
$mw->raise for (1..10);
printf "%.5f seconds, Perl/Tk %s (%s)\n", Tk::timeofday() - $t,
  $Tk::VERSION, $Tk::patchLevel;

Steve

'other perl hacker';$z='createText';$c=$m->Canvas(-wi,$_[1],-he,25)->grid;$c->$
En'.
'ter>',sub{$y=int(rand($m->screenheight));$m->geometry("+$y+$y")});MainLoop;



Thu, 16 Oct 2003 09:47:29 GMT  
 "wm deiconify" is sometimes really slow

Quote:

> This is an old problem and you'll find it in the bug tracker and has been
> reported plenty of times in the c.l.t. archives. Either Jeff Hobbs or Erik
> Melski said that it was due to a bug in the window manager (It only occurs
> on some window managers in Unix - particularly the Open Source ones), but
> I'm not entirely convinced from the explanation he gave me. The fact that

Hmmm, I answered this once, but my post seems to not have propagated
in several days.  Basically, you might not be convinced of the problem,
but it is known to occur only in the newer wm's made popular on Linux
(E and KDE).  E actually fixed its problem in v0.16 (although 0.15
was the default wm for RH6.x).  It's also in sawfish.  I believe they
are all sharing similar code bases.

It may be that Tk isn't understanding some nuance that these wms
are legitimately doing (like something new for theme support), but
Tk didn't have problems for years on *twm, mwm, olwm, fvwm, cde, ...
There is definitely a pattern...

Quote:
> it also happens on Windows  98 means that something really ought to be done
> about it (even if it is a bug in the window manager).

I can guarantee that whatever problems Peter is seeing aren't related
to the above code.  The wm code is almost completely separate for
each platform.

Quote:
> The only workaround I know of is to avoid using "wm deiconify" all together.

Or use a different wm...

--
  Jeff Hobbs                     The Tcl Guy
  Senior Developer               http://www.ActiveState.com/
      Tcl Support and Productivity Solutions



Thu, 16 Oct 2003 15:53:20 GMT  
 "wm deiconify" is sometimes really slow
<snip>

Quote:
> This has been a common subject for us Perl folks.  KDE seems to be the
> culprit,
> as determined by these seat-of-the-pants programs.  Let us know what you
> find:

KDE yes, but also Fvwm, Sawfish and probably others as well.

Morten



Fri, 17 Oct 2003 03:24:01 GMT  
 "wm deiconify" is sometimes really slow

Quote:


>> This is an old problem and you'll find it in the bug tracker and has been
>> reported plenty of times in the c.l.t. archives. Either Jeff Hobbs or
>> Erik Melski said that it was due to a bug in the window manager (It only
>> occurs on some window managers in Unix - particularly the Open Source
>> ones), but I'm not entirely convinced from the explanation he gave me.
>> The fact that

> Hmmm, I answered this once, but my post seems to not have propagated
> in several days.  Basically, you might not be convinced of the problem,

I saw your first answer a few days ago and I did understand that the
problem on Linux and Unix probably aren't related.

Quote:
> but it is known to occur only in the newer wm's made popular on Linux
> (E and KDE).  E actually fixed its problem in v0.16 (although 0.15
> was the default wm for RH6.x).  It's also in sawfish.  I believe they
> are all sharing similar code bases.

Yes, this is a likely explanation.

Quote:
> It may be that Tk isn't understanding some nuance that these wms
> are legitimately doing (like something new for theme support), but
> Tk didn't have problems for years on *twm, mwm, olwm, fvwm, cde, ...
> There is definitely a pattern...

The bug has also gotten into Fvwm now.

The point I'm trying to make is that it doesn't matter whether it is Tk or
KDE that has the bug, what people see is that Tk doesn't work very well on
Linux and they will find alternatives and this may well be Qt based
programs rather than finding a new window manager. If Tim has made a change
to the code that removes the 2 second delay I feel one should seriously
consider including it in the main distribution, even though it isn't Tk
that has the bug. One could start by putting it into tk8.4a3 giving it a
chance to be tested before being included in a stable release.

Please bear with me - I haven't analysed Tim's code and if it worsens the
legibility of the code, then of course it should not be accepted.

Morten



Fri, 17 Oct 2003 03:24:04 GMT  
 
 [ 21 post ]  Go to page: [1] [2]

 Relevant Pages 

1. Bug of "wm deiconify"

2. "if" expressions sometimes causes abort

3. "wm protocol ..."

4. wm transient $top "" causes crash

5. Tracelook 1.20 "Invalid command name wm"

6. "wm transient" maps a toplevel

7. Usage of "wm group"

8. Errors in "WM RESIZE"

9. help with "wm protocol"

10. Q: windows placed without "wm geometry"

11. problem with "wm geometry"

12. Problems with "wm iconposition" under olvwm

 

 
Powered by phpBB® Forum Software