Browse Source

[2701] Removed option definition validation from option factory functions.

This change should seriously rise the performance of the server as the
server seem to spend a lot of time executing the validate function.
Marcin Siodelski 12 years ago
parent
commit
27b34684dc
1 changed files with 0 additions and 4 deletions
  1. 0 4
      src/lib/dhcp/option_definition.cc

+ 0 - 4
src/lib/dhcp/option_definition.cc

@@ -109,8 +109,6 @@ OptionPtr
 OptionDefinition::optionFactory(Option::Universe u, uint16_t type,
                                 OptionBufferConstIter begin,
                                 OptionBufferConstIter end) const {
-    validate();
-
     try {
         switch(type_) {
         case OPT_EMPTY_TYPE:
@@ -200,8 +198,6 @@ OptionDefinition::optionFactory(Option::Universe u, uint16_t type,
 OptionPtr
 OptionDefinition::optionFactory(Option::Universe u, uint16_t type,
                                 const std::vector<std::string>& values) const {
-    validate();
-
     OptionBuffer buf;
     if (!array_type_ && type_ != OPT_RECORD_TYPE) {
         if (values.empty()) {