Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Frequent GUI updates inefficient ?
Frequent GUI updates inefficient ? [message #172592] Tue, 11 July 2006 18:59 Go to next message
Eclipse UserFriend
Originally posted by: vaibhavchopda.yahoo.com

Hi all

I am writing a view in eclipse which displays a model running in another
thread. I used Display.getDefault().asyncExec() to update the view display
when the model changes, which spawns a new thread to update the GUI. I
belive that this will spawn a new thread everytime the model changes and
wants to update the GUI. I belive this is a high overhead if the model
changes frequently.

1. Is the problem I point out really correct ?
2. If it is, is there any other and efficient way to update the GUI view ?

Thanks for answering !
With Regards
Vaibhav
Re: Frequent GUI updates inefficient ? [message #172754 is a reply to message #172592] Wed, 12 July 2006 20:32 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: mikhailkhod.rogers.com

The most of the debug perspective views are provided by the Eclipse
platform, not CDT. So, the better place to ask questions like this is the
"platform-debug-dev" mailing list. But I would suggest to check the
discussions posted to the "dsdp-dd-dev" mailing list and presentations at
various DSDP debuggger meetings first.

"vaibhav" <vaibhavchopda@yahoo.com> wrote in message
news:7ca4a34359abeec10f13db123f04202d$1@www.eclipse.org...
> Hi all
> I am writing a view in eclipse which displays a model running in another
> thread. I used Display.getDefault().asyncExec() to update the view display
> when the model changes, which spawns a new thread to update the GUI. I
> belive that this will spawn a new thread everytime the model changes and
> wants to update the GUI. I belive this is a high overhead if the model
> changes frequently.
> 1. Is the problem I point out really correct ? 2. If it is, is there any
> other and efficient way to update the GUI view ?
>
> Thanks for answering ! With Regards
> Vaibhav
>
>
Re: Frequent GUI updates inefficient ? [message #172786 is a reply to message #172592] Thu, 13 July 2006 00:32 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: wegener.cboenospam.com

vaibhav wrote:
> Hi all
> I am writing a view in eclipse which displays a model running in another
> thread. I used Display.getDefault().asyncExec() to update the view
> display when the model changes, which spawns a new thread to update the
> GUI. I belive that this will spawn a new thread everytime the model
> changes and wants to update the GUI. I belive this is a high overhead if
> the model changes frequently.
> 1. Is the problem I point out really correct ? 2. If it is, is there any
> other and efficient way to update the GUI view ?
>
> Thanks for answering ! With Regards
> Vaibhav
>
>

The asyncExec call does not create a new thread, it queues the runnable
that you pass into the asyncExec call on the GUI event queue. There is
a single GUI thread that processes all GUI events. You don't need to
worry about flooding the system with threads.

You could still have performance problems however. If you place
runnables on the GUI event queue faster than the GUI thread can remove
them your application will become un-responsive to user input (you will
also have high CPU usage). The rate you application can handle depends
on how much work each runnable is doing and how fast your computer is.
However, you should probably be able to handle thousands of updates per
second.
Re: Frequent GUI updates inefficient ? [message #173593 is a reply to message #172786] Mon, 24 July 2006 18:49 Go to previous message
Eclipse UserFriend
Originally posted by: vaibhavchopda.yahoo.com

thanks for the answer ! I am now sure and confident using aynchExec call.
Thanks a lot again
Regards
Vaibhav
Previous Topic:jumping into the CDT code
Next Topic:How to call up and display manual pages
Goto Forum:
  


Current Time: Fri Oct 18 11:31:29 GMT 2024

Powered by FUDForum. Page generated in 0.02084 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top