[M] Change in ...nfs-ganesha[next]: Config Parser: Optimized the parsing of config file
Shivam Singh has uploaded this change for review. ( https://review.gerrithub.io/c/ffilz/nfs-ganesha/+/1201043?usp=email ) Change subject: Config Parser: Optimized the parsing of config file ...................................................................... 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 https://review.gerrithub.io/c/ffilz/nfs-ganesha/+/1201043?usp=email To unsubscribe, or for help writing mail filters, visit https://review.gerrithub.io/settings?usp=email 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>
participants (1)
-
Shivam Singh (GerritHub)