[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.tools.emf] Re: ChangeDescription applyAndReverse performance issue

Hi, Bryan,

What do you see as a performance problem? The ChangeRecorder has a lot of work to do in applying itself and in reversing itself. Presumably, your application won't work if it doesn't have these changes to analyze.

I think you'll have to be more specific about what you think is the performance problem in order to get a useful response. For what it's trying to do, which is to provide a general-purpose EMF-serializable model of changes, the ChangeDescription is pretty efficient.

Cheers,

Christian

Bryan Hunt wrote:
I've got a performance problem that I've narrowed down to applyAndReverse() on a ChangeDescription. My code looks something like:

ChangeDescription changes = changeRecorder.endRecording();
changes.applyAndReverse();

// process changes

change.applyAndReverse();
changeRecorder.beginRecording(Collections.singleton(this));

I first commented out my processing code and that made no difference in the performance. As soon as I commented out both calls to applyAndReverse(), my performance problem was gone. I think my solution will be to write a custom change recorder that that captures the new state instead of the old state. It won't support rollbacks, but I hope it will be much faster. Comments?

Bryan