Gui blocks after a a couple of updates, push problem?

Hi,

I have a question about pushing data from the client to the server. I use:

          parent.access(new Runnable() {
                @Override
                public void run() {
                    updateDevice(configuration);
                }
            });        

This works fine and I see the update in my table (which shows all devices).

First question is about client and server side code. The above is called directly from pushing a button and the user entering some changes but also from a background thread when changes are received from somewhere else. In the first case I wouldn’t need the access method, does it hurt if I do anyway?

Second question is: can these access calls be nested? For example when inside the updateDevice call I also update some other component (log area in this case) in the same manner.

Final question is about my GUI blocking (or is very slow) after a couple of interactions. Is this related to my first two questions, or can there be something else wrong? At first I see all changes happening immediately, and suddenly I don’t see them, but only after 10 or 20 seconds and the GUI is not responsive anymore.

Any thoughts would be appreciated.

Ad.

First, yes, invoking access() when the thread already has the session lock will simply execute the Runnable immediately (synchronously, before the access() call returns), although with some minor overhead.

Second, yes, it’s the same situation as calling from an event handler.

Third, hard to say without knowing more about your application and deployment environment. Could you provide a small test case that exhibits the problem?

Ok, thanks for answering at least the first two questions. Glad that the answers are yes :slight_smile:

A small test case you ask, I wil try it, hopefully I will be able to do it. So I will report back tomorrow.

Ad

It has been a little longer than expected, but I found out that the error was in the add-on component I was using and not in my code. Don’t know what the error was, but if I removed the component and used another similar add-on component, than everything works fine.

Ad.