skmprabhu252@gmail.com has uploaded this change for review.

View Change

Config: Fix Long Parsing Time for Large Exports

The parser is experiencing prolonged processing times when handling
a large number of exports. This delay is primarily attributed to the
repetitive use of the strcmp function within the save_token() function.

To fix this, token string formatting was improved and hashing was
implemented for faster string searches, along with strlen comparison.
These changes led to a remarkable 95% boost in config parsing performance.

Without fix:
config_pointer = 0x8288f0config_pointer = 0x82cb60
real 28m38.646s
user 28m27.089s

With Fix:
config_pointer = 0x9a68f0config_pointer = 0x9aab70
real 1m34.930s
user 1m30.249s
sys 0m0.119s

Change-Id: I4084b1953e29f2d06abad9e639f9eadb1a133ca6
Signed-off-by: Prabhu Murugesan <prabhu.murugesan1@ibm.com>
---
M src/config_parsing/analyse.c
M src/config_parsing/analyse.h
2 files changed, 86 insertions(+), 50 deletions(-)

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

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

Gerrit-MessageType: newchange
Gerrit-Project: ffilz/nfs-ganesha
Gerrit-Branch: next
Gerrit-Change-Id: I4084b1953e29f2d06abad9e639f9eadb1a133ca6
Gerrit-Change-Number: 1183423
Gerrit-PatchSet: 1
Gerrit-Owner: skmprabhu252@gmail.com