URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=5dfdd2b5a5eb74426d090c4250b4c356d6feee6d
Submitter: Evan Huus (eapache@xxxxxxxxx)
Changed: branch: master
Repository: wireshark
Commits:
5dfdd2b by Jakub Zawadzki (darkjames@xxxxxxxxxxxx):
Optimize dissect_eth_common(): cache result of get_ether_name()
In Anders profile output[1] is looks like that get_ether_name() is called
four times, twice for src and dst. get_ether_name() takes ~2% of Ir, so
caching result should reduce Ir count by 1%.
Similar thing was already done for UDP and TCP - 5235dc6ca0d7ec4e6c1fe38cae34763366830629
[1] http://www.wireshark.org/lists/wireshark-dev/201405/msg00063.html
Change-Id: I9ca582b0522387dbfaad866a48a0934693a2849f
Reviewed-on: https://code.wireshark.org/review/1808
Reviewed-by: Pascal Quantin <pascal.quantin@xxxxxxxxx>
Reviewed-by: Evan Huus <eapache@xxxxxxxxx>
Actions performed:
from 70d67a2 Make packet-ieee80211.c a tiny bit less unreadable. <rant> This file is riddled with lots of magical flags causing the code to do one thing or another, and then in several cases with non-telling variable names (e.g. is_centrino). My absolute favourite is
adds 5dfdd2b Optimize dissect_eth_common(): cache result of get_ether_name()
Summary of changes:
epan/dissectors/packet-eth.c | 40 ++++++++++++++++++++++------------------
1 file changed, 22 insertions(+), 18 deletions(-)