[svn] commit: r3943 - in /branches/trac444/src/lib/datasrc: memory_datasrc.cc memory_datasrc.h result.h zone.h

BIND 10 source code commits bind10-changes at lists.isc.org
Tue Dec 21 19:32:18 UTC 2010


Author: vorner
Date: Tue Dec 21 19:32:18 2010
New Revision: 3943

Log:
Code cleanups according to review

Modified:
    branches/trac444/src/lib/datasrc/memory_datasrc.cc
    branches/trac444/src/lib/datasrc/memory_datasrc.h
    branches/trac444/src/lib/datasrc/result.h
    branches/trac444/src/lib/datasrc/zone.h

Modified: branches/trac444/src/lib/datasrc/memory_datasrc.cc
==============================================================================
--- branches/trac444/src/lib/datasrc/memory_datasrc.cc (original)
+++ branches/trac444/src/lib/datasrc/memory_datasrc.cc Tue Dec 21 19:32:18 2010
@@ -42,6 +42,13 @@
     /*
      * Each domain consists of some RRsets. They will be looked up by the
      * RRType.
+     *
+     * The use of map is questionable with regard to performance - there'll
+     * be usually only few RRsets in the domain, so the log n benefit isn't
+     * much and a vector/array might be faster due to its simplicity and
+     * continuous memory location. But this is unlikely to be a performance
+     * critical place and map has better interface for the lookups, so we use
+     * that.
      */
     typedef map<RRType, ConstRRsetPtr> Domain;
     typedef boost::shared_ptr<Domain> DomainPtr;

Modified: branches/trac444/src/lib/datasrc/memory_datasrc.h
==============================================================================
--- branches/trac444/src/lib/datasrc/memory_datasrc.h (original)
+++ branches/trac444/src/lib/datasrc/memory_datasrc.h Tue Dec 21 19:32:18 2010
@@ -25,10 +25,6 @@
 namespace datasrc {
 
 /// A derived zone class intended to be used with the memory data source.
-///
-/// Currently this is almost empty and is only used for testing the
-/// \c ZoneTable class.  It will be substantially expanded, and will probably
-/// moved to a separate header file.
 ///
 /// \todo Is this really needed in header file? If it is used only inside
 /// MemoryDataSrc, we could move it to .cc file and not care about the impl_.

Modified: branches/trac444/src/lib/datasrc/result.h
==============================================================================
--- branches/trac444/src/lib/datasrc/result.h (original)
+++ branches/trac444/src/lib/datasrc/result.h Tue Dec 21 19:32:18 2010
@@ -1,4 +1,5 @@
-// Copyright (C) 2010  CZ NIC, Inc. ("ISC")
+// Copyright (C) 2010  CZ NIC
+// Copyright (C) 2010  Internet Systems Consortium, Inc. ("ISC")
 //
 // Permission to use, copy, modify, and/or distribute this software for any
 // purpose with or without fee is hereby granted, provided that the above
@@ -29,7 +30,7 @@
     SUCCESS,  ///< The operation is successful.
     EXIST,    ///< The search key is already stored.
     NOTFOUND, ///< The specified object is not found.
-    PARTIALMATCH ///< \c Only a partial match is found.
+    PARTIALMATCH ///< Only a partial match is found.
 };
 
 }

Modified: branches/trac444/src/lib/datasrc/zone.h
==============================================================================
--- branches/trac444/src/lib/datasrc/zone.h (original)
+++ branches/trac444/src/lib/datasrc/zone.h Tue Dec 21 19:32:18 2010
@@ -1,4 +1,5 @@
-// Copyright (C) 2010  CZ NIC, Inc. ("ISC")
+// Copyright (C) 2010  CZ NIC
+// Copyright (C) 2010  Internet Systems Consortium, Inc. ("ISC")
 //
 // Permission to use, copy, modify, and/or distribute this software for any
 // purpose with or without fee is hereby granted, provided that the above




More information about the bind10-changes mailing list