Speed and memory size optimisation (#1214)
Removed bigram_automata, impossible_bigram_automata, trigram_automata. The ahocorasick structure is replaced with a bitmap. The bitmap size for ndpi_en_bigram is 176 bytes. The bitmap size for ndpi_en_trigram is 2201 bytes. On the test machine, the test execution time was reduced from 27.3 seconds to 24.7 (9%).
This commit is contained in:
@@ -499,9 +499,7 @@ extern "C" {
|
||||
* @return 0
|
||||
*
|
||||
*/
|
||||
int ndpi_match_bigram(struct ndpi_detection_module_struct *ndpi_mod,
|
||||
ndpi_automa *automa,
|
||||
char *bigram_to_match);
|
||||
int ndpi_match_bigram(const char *bigram_to_match);
|
||||
|
||||
/**
|
||||
* Write the protocol name in the buffer -buf- as master_protocol.protocol
|
||||
|
||||
Reference in New Issue
Block a user