Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.gui > #3932

Re: Problem with Swing Ti

From "John B. Matthews" <john.b..matthews@THRWHITE.remove-dii-this>
Subject Re: Problem with Swing Ti
Message-ID <nospam-493790.16160708082008@web.aioe.org> (permalink)
Newsgroups comp.lang.java.gui
References <6a90ee4f-075a-471a-bc01-8b008e0d7954@m73g2000hsh.googlegroups.com>
Date 2011-04-27 15:47 +0000
Organization TDS.net

Show all headers | View raw


  To: comp.lang.java.gui
In article 
<6a90ee4f-075a-471a-bc01-8b008e0d7954@m73g2000hsh.googlegroups.com>,
 ifarberov@lsplab.com wrote:

> On Aug 8, 2:06aam, "John B. Matthews" <nos...@nospam.invalid> wrote:
> > In article
> > <b469becd-b3d6-49b4-8582-bce9c9296...@x35g2000hsb.googlegroups.com>,
> >
> > aifarbe...@lsplab.com wrote:
> > > On Aug 7, 6:29 pm, Roedy Green <see_webs...@mindprod.com.invalid>
> > > wrote:
> > > > On Thu, 7 Aug 2008 10:24:41 -0700 (PDT), ifarbe...@lsplab.com wrote,
> > > > quoted or indirectly quoted someone who said :
> >
> > > > > have developed a Swing client that is comprised of 8 different
> > > > >screens. T
> >
> > > > All the Swing gui updating, all the Swing event handling, and all your
> > > > timer tasks are handled by a single thread. If any one of them takes a
> > > > long time or goes to sleep or waits for something, it will hold up the
> > > > entire assembly line.
> >
> > > [...]
> > > The problem is that GUI remains responsive, but Timer-driven events
> > > don't get fired for a while, and then they just resume.
> >
> > You might verify that the actionPerformed() method of the Timer's
> > designated ActionListener is being called with the Timer's nominal
> > period. Using start(), stop(), restart(), setDelay() or setRepeats() in
> > a subclass are all potential culprits. How do the subclasses deal with
> > network latency in the normal course? Is your network experiencing
> > unusual delays, as Daniele suggests?
>[...] 

> This happens most often, when both client and server run on the same 
> machine, so network delays can be rulled out.

This certainly suggests some kind of resource contention, and even the 
loopback interface takes time and consumes cycles.

> I would understand it it if the whole GUI was locked - that would 
> mean that update is taking too long or deadlocking.  But instead it 
> seems that Timer events just stop firing all together.

Which makes me wonder if a subclass stops the timer while waiting for 
something. If it's possible, the NetBeans IDE profiler has a nice 
threads display. As javax.swig.Timer action event handlers execute on 
the EDT, look for AWT-EventQueue-0 (or similar). I'm sure other IDEs 
have something similar.

-- 
John B. Matthews
trashgod at gmail dot com
home dot woh dot rr dot com slash jbmatthews

---
 * Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet!
--- Synchronet 3.15a-Win32 NewsLink 1.92
Time Warp of the Future BBS - telnet://time.synchro.net:24

Back to comp.lang.java.gui | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: Problem with Swing Ti "Roedy Green" <roedy.green@THRWHITE.remove-dii-this> - 2011-04-27 15:47 +0000
  Re: Problem with Swing Ti "ifarberov" <ifarberov@THRWHITE.remove-dii-this> - 2011-04-27 15:47 +0000
    Re: Problem with Swing Ti "Daniele Futtorovic" <daniele.futtorovic@THRWHITE.remove-dii-this> - 2011-04-27 15:47 +0000
    Re: Problem with Swing Ti "John B. Matthews" <john.b..matthews@THRWHITE.remove-dii-this> - 2011-04-27 15:47 +0000
      Re: Problem with Swing Ti "ifarberov" <ifarberov@THRWHITE.remove-dii-this> - 2011-04-27 15:47 +0000
        Re: Problem with Swing Ti "John B. Matthews" <john.b..matthews@THRWHITE.remove-dii-this> - 2011-04-27 15:47 +0000
          Re: Problem with Swing Ti "ifarberov" <ifarberov@THRWHITE.remove-dii-this> - 2011-04-27 15:47 +0000
            Re: Problem with Swing Ti "Roedy Green" <roedy.green@THRWHITE.remove-dii-this> - 2011-04-27 15:47 +0000
              Re: Problem with Swing Ti "John B. Matthews" <john.b..matthews@THRWHITE.remove-dii-this> - 2011-04-27 15:47 +0000

csiph-web