directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From seelm...@apache.org
Subject svn commit: r829070 - /directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/views/modificationlogs/ModificationLogsViewUniversalListener.java
Date Fri, 23 Oct 2009 14:03:54 GMT
Author: seelmann
Date: Fri Oct 23 14:03:54 2009
New Revision: 829070

URL: http://svn.apache.org/viewvc?rev=829070&view=rev
Log:
Don't need this performance optimization any more, as we fire much less events now.

Modified:
    directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/views/modificationlogs/ModificationLogsViewUniversalListener.java

Modified: directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/views/modificationlogs/ModificationLogsViewUniversalListener.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/views/modificationlogs/ModificationLogsViewUniversalListener.java?rev=829070&r1=829069&r2=829070&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/views/modificationlogs/ModificationLogsViewUniversalListener.java
(original)
+++ directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/views/modificationlogs/ModificationLogsViewUniversalListener.java
Fri Oct 23 14:03:54 2009
@@ -32,7 +32,6 @@
 import org.apache.directory.studio.ldapbrowser.common.actions.BrowserSelectionUtils;
 import org.apache.directory.studio.ldapbrowser.core.BrowserCorePlugin;
 import org.apache.directory.studio.ldapbrowser.core.events.AttributesInitializedEvent;
-import org.apache.directory.studio.ldapbrowser.core.events.BulkModificationEvent;
 import org.apache.directory.studio.ldapbrowser.core.events.ChildrenInitializedEvent;
 import org.apache.directory.studio.ldapbrowser.core.events.EntryModificationEvent;
 import org.apache.directory.studio.ldapbrowser.core.events.EntryUpdateListener;
@@ -60,9 +59,6 @@
     /** The current input */
     private ModificationLogsViewInput input;
 
-    /** The last refresh timestamp. */
-    private long lastRefreshTimestamp;
-
     /** Listener that listens for selections of connections */
     private INullSelectionListener connectionSelectionListener = new INullSelectionListener()
     {
@@ -183,16 +179,10 @@
      */
     public void entryUpdated( EntryModificationEvent event )
     {
-        // performance optimization: refresh only once per second, but always at the end
of bulk modifications
-        long now = System.currentTimeMillis();
-        if ( lastRefreshTimestamp + 1000 < now || event instanceof BulkModificationEvent
)
+        if ( !( event instanceof AttributesInitializedEvent ) && !( event instanceof
ChildrenInitializedEvent ) )
         {
-            if ( !( event instanceof AttributesInitializedEvent ) && !( event instanceof
ChildrenInitializedEvent ) )
-            {
-                refreshInput();
-                scrollToNewest();
-                lastRefreshTimestamp = now;
-            }
+            refreshInput();
+            scrollToNewest();
         }
     }
 



Mime
View raw message