Hi,

I just modified the code of LayerTableModel#removeAll method.
The speed improvement can be dramatic for more than 10000 features removal.

Test :
Open a table with more than 100 000 features
Select more than 10 000 features in the table
Delete

Attribute Table is a core function of OpenJUMP. I committed the change 
as soon as possible to make it available in the nightly build for tests.
If any corner case is found before 1.4 release, I'll revert the code.

Note about database : I did not test table connected on database. 
Currently, I think we have no driver able to update a database this way.
In the change I made, I replaced the per feature fireTableChanged(row) 
instruction by a global fireTableChanged.
I don't know if there is a good reason to throw a fireTableChanged for 
each single feature removal.

Making my own tests, I noticed that :
- you can delete features from the table, either if the features are 
selected with the selection tool (highlighted in the view pane) or not 
(just selected in the table)
   (of course, layer must be editable)
- you cannot delete from the info pane (either from editable layer or 
not editable layer)
- you cannot remove from table displayed by simple query plugin
(just to make you know, this behaviour seems ok to me)

Michaël

------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today.
http://p.sf.net/sfu/beautyoftheweb
_______________________________________________
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel

Reply via email to