Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

Long running operation and performance

We have an Eclipse plug-in which extends RTC to create/update custom work items programmatically. Predictably,few operations from our UI end up throwing 'Long-running operations prohibited on this thread'. The solution of putting those operations in a seperate thread/job works fine but with a penalty of performance.

1) If the intention of throwing this exception is just not to leave the UI frozen during the operation, is there
any way of offsetting it to possibly shorter operations such as getting an attribute from a work item?

2) Invoking a 'Long-running operation' in a UI thread is going to do any harm other than freezing the UI? If not,
can we suppress the IllegalState exception and live without a non-UI thread for shorter operations?

In short, is there any better way of handling this problem without performance penalty of going for a separate thread/job.

Thanks in advance.

0 votes



One answer

Permanent link
On Thu, 18 Mar 2010 09:38:04 +0000, raga wrote:

We have an Eclipse plug-in which extends RTC to create/update custom
work items programmatically. Predictably,few operations from our UI end
up throwing 'Long-running operations prohibited on this thread'. The
solution of putting those operations in a seperate thread/job works fine
but with a penalty of performance.

1) If the intention of throwing this exception is just not to leave the
UI frozen during the operation, is there any way of offsetting it to
possibly shorter operations such as getting an attribute from a work
item?

2) Invoking a 'Long-running operation' in a UI thread is going to do any
harm other than freezing the UI? If not, can we suppress the
IllegalState exception and live without a non-UI thread for shorter
operations?

In short, is there any better way of handling this problem without
performance penalty of going for a separate thread/job.

Thanks in advance.

I personally have strong feelings about this one. Others may disagree.
But in my opinion, it is a cardinal sin to run a long op in the UI
thread. It's equivalent in my mind to a GPF because once you have the UI
thread blocked the only way for the user to exit the application is to
kill it - complete with the loss of unsaved data that that implies.

The overhead of spawning a background thread is totally insignificant,
but the gain in responsiveness for your application is massive.

In short, do it in a background thread.

--
Jared Burns
Jazz Process Team

0 votes

Your answer

Register or log in to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 10,927

Question asked: Mar 18 '10, 5:37 a.m.

Question was seen: 6,244 times

Last updated: Mar 18 '10, 5:37 a.m.

Confirmation Cancel Confirm