Custom Query (1894 matches)

Filters
 
Or
 
  
 
Columns

Show under each result:


Results (16 - 18 of 1894)

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
Ticket Resolution Summary Owner Reporter
#2706 fixed Reduce DEFAULT_INITIAL_ACK_DELAY Zlatin Balevsky
Description

I did an experiment of reducing this value drastically. To my surprise, it did not result in reduction in the efficiency of acks as measured by average messages per ACK.

In the attached spreadsheet there are three pages: "Throughput" measures final throughput as reported by eepget "Ack efficiency 50" lists the number of messages per ACK as extracted from logs of DEFAULT_INITIAL_ACK_DELAY=50 "Ack efficiency 750" - same as above but with default value of 750

#2699 fixed Fix FragmentHandler zzz jogger
Description

I read about possible concurrency problems here and found that the fields of FragmentedMessage? are not volatile. Syncing should not be sufficient. Issues should only arise with SSU and messages ≥ 3 fragments running through multiple threads.

Also _cache seems unused.

Message generation produces lots of unnecessary locking as it it misses use of the double check idiom.

#2694 fixed FloodfillPeerSelector: Remove bottlenecks zzz jogger
Description

The addall() to the sorted treeset costs lots of CPU due to poor implementation of mass additions on the Java level. Collections.sort() is much faster.

the _sorted treeset is accessed much too often at the end of get().

Patch:

--- i2p-0.9.44/router/java/src/net/i2p/router/networkdb/kademlia/FloodfillPeerSelector.java
+++ 44dev/router/java/src/net/i2p/router/networkdb/kademlia/FloodfillPeerSelector.java
@@ -13,6 +13,7 @@
 import java.util.Collections;
 import java.util.HashSet;
 import java.util.Iterator;
+import java.util.LinkedList;
 import java.util.List;
 import java.util.Set;
 import java.util.TreeSet;
@@ -203,13 +204,12 @@
      *  @param kbuckets now unused
      */
     private List<Hash> selectFloodfillParticipantsIncludingUs(Hash key, int howMany, Set<Hash> toIgnore, KBucketSet<Hash> kbuckets) {
-        List<Hash> ffs = selectFloodfillParticipants(toIgnore, kbuckets);
-        TreeSet<Hash> sorted = new TreeSet<Hash>(new XORComparator<Hash>(key));
-        sorted.addAll(ffs);
+        LinkedList<Hash> sorted = new LinkedList<Hash>(selectFloodfillParticipants(toIgnore, kbuckets));
+        Collections.sort(sorted, new XORComparator<Hash>(key));
 
         List<Hash> rv = new ArrayList<Hash>(howMany);
-        List<Hash> okff = new ArrayList<Hash>(ffs.size());
-        List<Hash> badff = new ArrayList<Hash>(ffs.size());
+        List<Hash> okff = new ArrayList<Hash>(sorted.size());
+        List<Hash> badff = new ArrayList<Hash>(sorted.size());
         int found = 0;
         long now = _context.clock().now();
         long installed = _context.getProperty("router.firstInstalled", 0L);
@@ -229,14 +229,13 @@
 
         // 5 == FNDF.MAX_TO_FLOOD + 1
         int limit = Math.max(5, howMany);
-        limit = Math.min(limit, ffs.size());
+        limit = Math.min(limit, sorted.size());
         MaskedIPSet maskedIPs = new MaskedIPSet(limit * 3);
         // split sorted list into 3 sorted lists
         for (int i = 0; found < howMany && i < limit; i++) {
-            Hash entry = sorted.first();
+            Hash entry = sorted.poll();
             if (entry == null)
                 break;  // shouldn't happen
-            sorted.remove(entry);
             // put anybody in the same /16 at the end
             RouterInfo info = _context.netDb().lookupRouterInfoLocally(entry);
             MaskedIPSet entryIPs = new MaskedIPSet(_context, entry, info, 2);
@@ -442,11 +441,10 @@
             }
             // are we corrupting _sorted here?
             for (int i = rv.size(); i < howMany; i++) {
-                if (_sorted.isEmpty())
+                Hash entry = _sorted.pollFirst();
+                if (entry == null)
                     break;
-                Hash entry = _sorted.first();
                 rv.add(entry);
-                _sorted.remove(entry);
             }
             return rv;
         }
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
Note: See TracQuery for help on using queries.