]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/commitdiff
[registry] optimize at every restart/rescan
authorMatthias H <apoc@sixserv.org>
Mon, 24 Feb 2014 05:11:16 +0000 (06:11 +0100)
committerMatthias H <apoc@sixserv.org>
Mon, 24 Feb 2014 05:11:16 +0000 (06:11 +0100)
lib/rbot/registry.rb

index 6c18df2143ee7872868909b9c37279b2292c2189..799e69ee4f0a72d9876b1257842dcd41b3915e84 100644 (file)
@@ -73,7 +73,9 @@ class Registry
     # (the configured one) accessor implementation, we can just assume
     # it to be the correct accessor to use.
     cls = AbstractAccessor.get_impl.first
-    cls.new(File.join(path, 'registry_' + @format, filename.downcase))
+    db = cls.new(File.join(path, 'registry_' + @format, filename.downcase))
+    db.optimize
+    db
   end
 
   # Helper method that will return a list of supported registry formats.