View Issue Details

IDProjectCategoryView StatusLast Update
0001837GNUnetfile-sharing servicepublic2011-10-31 12:00
ReporterChristian Grothoff Assigned ToChristian Grothoff  
PrioritynormalSeverityminorReproducibilityN/A
Status closedResolutionfixed 
Summary0001837: fs uses O(n) operation where O(1) should do
DescriptionWe do a priority-heap iteration; instead, we should look up the desired value by key in a hash map. Here is the code:

--- gnunet/src/fs/gnunet-service-fs_pe.c 2011-10-10 08:38:39 UTC (rev 17301)
+++ gnunet/src/fs/gnunet-service-fs_pe.c 2011-10-10 10:30:59 UTC (rev 17302)
@@ -501,6 +501,8 @@
   }
   mpc.merged = GNUNET_NO;
   mpc.pr = pr;
+ /* FIXME: O(n) call here, LRN reports this is a performance
+ problem. Try using hash map!? */
   GNUNET_CONTAINER_heap_iterate (pp->priority_heap, &merge_pr, &mpc);
 
TagsNo tags attached.

Activities

Christian Grothoff

2011-10-24 13:00

manager   ~0004750

Fixed in SVN revision 17707.

Issue History

Date Modified Username Field Change
2011-10-23 00:05 Christian Grothoff New Issue
2011-10-23 00:05 Christian Grothoff Status new => assigned
2011-10-23 00:05 Christian Grothoff Assigned To => Christian Grothoff
2011-10-24 13:00 Christian Grothoff Note Added: 0004750
2011-10-24 13:00 Christian Grothoff Status assigned => resolved
2011-10-24 13:00 Christian Grothoff Fixed in Version => 0.9.0pre4
2011-10-24 13:00 Christian Grothoff Resolution open => fixed
2011-10-25 17:03 Christian Grothoff Target Version 0.9.0 => 0.9.0pre4
2011-10-31 12:00 Christian Grothoff Status resolved => closed