[Issue 470] New - BasicEventList.addAll() is notify-efficient but BasicEventList.clear() is not

View: New views
4 Messages — Rating Filter:   Alert me  

[Issue 470] New - BasicEventList.addAll() is notify-efficient but BasicEventList.clear() is not

by arghman-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

https://glazedlists.dev.java.net/issues/show_bug.cgi?id=470
                 Issue #|470
                 Summary|BasicEventList.addAll() is notify-efficient but BasicE
                        |ventList.clear() is not
               Component|glazedlists
                 Version|current
                Platform|PC
              OS/Version|Windows XP
                     URL|
                  Status|NEW
       Status whiteboard|
                Keywords|
              Resolution|
              Issue type|DEFECT
                Priority|P2
            Subcomponent|core
             Assigned to|jessewilson
             Reported by|arghman






------- Additional comments from arghman@... Fri Mar 20 20:56:32 +0000 2009 -------
Apologies if this is known, I wasn't sure what to search for.

It looks like BasicEventList is smart enough to fire a single TableModelEvent
when addAll() is called on a collection, but it fires one TableModelEvent per
row when clear() is called. I'm hesitant to call that a DEFECT, but if you have
a table with thousands of rows, and when you clear() it you get one event per
row, something seems wrong.

Test code to illustrate will follow...

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@...
For additional commands, e-mail: issues-help@...


[Issue 470] BasicEventList.addAll() is notify-efficient but BasicEventList.clear() is not

by arghman-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

https://glazedlists.dev.java.net/issues/show_bug.cgi?id=470






------- Additional comments from arghman@... Fri Mar 20 21:02:08 +0000 2009 -------
Created an attachment (id=44)
test case (click on buttons at bottom & watch console)


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@...
For additional commands, e-mail: issues-help@...


[Issue 470] BasicEventList.addAll() is notify-efficient but BasicEventList.clear() is not

by arghman-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

https://glazedlists.dev.java.net/issues/show_bug.cgi?id=470



User arghman changed the following:

                What    |Old value                 |New value
================================================================================
                Priority|P2                        |P4
--------------------------------------------------------------------------------




------- Additional comments from arghman@... Fri Mar 20 21:03:47 +0000 2009 -------
(oops I meant P4, got the priority scale backwards)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@...
For additional commands, e-mail: issues-help@...


[Issue 470] BasicEventList.addAll() is notify-efficient but BasicEventList.clear() is not

by BRANDS-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

https://glazedlists.dev.java.net/issues/show_bug.cgi?id=470






------- Additional comments from brands@... Sun Mar 22 16:55:49 +0000 2009 -------
I think the cause of the problem is related to what I tried to explain here:
https://glazedlists.dev.java.net/servlets/ReadMsg?list=users&msgNo=3969

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@...
For additional commands, e-mail: issues-help@...