Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Is there a way to delete the data EList (Xcore) from my tableviewer faster?(Is there a way to delete the data EList (Xcore) from my tableviewer faster?)
Is there a way to delete the data EList (Xcore) from my tableviewer faster? [message #1828265] Fri, 05 June 2020 08:20 Go to next message
Patrick Kremer is currently offline Patrick KremerFriend
Messages: 1
Registered: June 2020
Junior Member
i connected a table viewer to an EList (xcore) via databinding.

ObservableListContentProvider listContentProvider = new ObservableListContentProvider();
IObservableMap[] observeMaps = EMFObservables.observeMaps(listContentProvider.getKnownElements(), new EStructuralFeature[]{Literals.TEST1__NAME});
tableViewer.setLabelProvider(new ObservableMapLabelProvider(observeMaps));
IObservableList testInputObserveList = EMFObservables.observeList(Realm.getDefault(), test, Literals.TEST__INPUT);

I have a lot of records (+/-4000 Entrys) in my table and i want to delete them with the code clear(), the deletion process takes several seconds.


Is there a way to delete the data from my table faster?


Re: Is there a way to delete the data EList (Xcore) from my tableviewer faster? [message #1828292 is a reply to message #1828265] Sat, 06 June 2020 03:47 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 32501
Registered: July 2009
Senior Member
Looking at the implementation I expect that a single notification is produced and handled by this part of the code to compute the diff:

I expect that part is O(n) to compute the list of diffs. The diff is then fired here:

And after that the observer implementation does all the work and if it's that slow, likely there is some O(n^2) work being done there.

But I see no special support for "clear" in the platform's data binding framework, so there is nothing I see that you can optimize at your end or that I can optimize in the EMF framework in this regard.

In the end, to optimize anything like this, one would need to measure where the costs are with a profiler. YourKit is very good...

Ed Merks
Professional Support:
Previous Topic:[Transaction] Lifecycle events for nested transactions
Next Topic:TableViewer of EMF object with calculated column?
Goto Forum:

Current Time: Sun Oct 02 03:50:30 GMT 2022

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

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

Back to the top