Commit 27b34684 authored by Marcin Siodelski's avatar Marcin Siodelski

[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.
parent ddca3c08
......@@ -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()) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment