1. A method comprising: using a classifier table having a plurality of rules, the plurality of rules having at least one field, building a decision tree structure including a plurality of nodes, each node representing a subset of the plurality of rules; determining for each level of the decision tree whether to merge grandchildren of a parent node with child nodes of the parent node based on a merge resulting in a total number of child nodes of the parent node not being more than a given threshold; merging at each level the grandchildren of the parent node with child nodes of the parent node based on the determination; and storing the decision tree structure.