Shivam Singh has uploaded this change for review.

View Change

Config Parser: Optimized the parsing of config file

The parser, maintaining a token table in a linkedlist
having a lookup time O(n) has been changed to an AVL
tree and now having a lookup time of O(logn). Further,
keys for avl tree are the hash values of token strings
which also saves the time for string comparision
during lookup.

Used avltree and city hash for implementation and found
a remarkable improvement in parsing time.

Without Optimization:
Config file with 20000 exports taking ~ 1780s

With Optimization:
Config file with 20000 exports taking ~ 0s
Config file with 100000 exports taking ~ 3s

Change-Id: I92430eceea544c09cfaea4ed23eb6465148ab790
Signed-off-by: Shivam Singh <shivam.singh9@ibm.com>
---
M src/config_parsing/analyse.c
M src/config_parsing/analyse.h
M src/config_parsing/conf_lex.l
3 files changed, 132 insertions(+), 45 deletions(-)

git pull ssh://review.gerrithub.io:29418/ffilz/nfs-ganesha refs/changes/43/1201043/1

To view, visit change 1201043. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-MessageType: newchange
Gerrit-Project: ffilz/nfs-ganesha
Gerrit-Branch: next
Gerrit-Change-Id: I92430eceea544c09cfaea4ed23eb6465148ab790
Gerrit-Change-Number: 1201043
Gerrit-PatchSet: 1
Gerrit-Owner: Shivam Singh <shivam.singh9@ibm.com>