View Issue Details

IDProjectCategoryView StatusLast Update
0001837GNUnetfile-sharing servicepublic2011-10-31 11:00
ReporterChristian Grothoff Assigned ToChristian Grothoff Due Date
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 11:00

manager   ~0004750

Fixed in SVN revision 17707.

Issue History

Date ModifiedUsernameFieldChange
2011-10-22 22:05Christian GrothoffNew Issue
2011-10-22 22:05Christian GrothoffStatusnew => assigned
2011-10-22 22:05Christian GrothoffAssigned To => Christian Grothoff
2011-10-24 11:00Christian GrothoffNote Added: 0004750
2011-10-24 11:00Christian GrothoffStatusassigned => resolved
2011-10-24 11:00Christian GrothoffFixed in Version => 0.9.0pre4
2011-10-24 11:00Christian GrothoffResolutionopen => fixed
2011-10-25 15:03Christian GrothoffTarget Version0.9.0 => 0.9.0pre4
2011-10-31 11:00Christian GrothoffStatusresolved => closed