[PR PATCH] traffic: optimize packet init for better performance

github at samba.org github at samba.org
Thu May 10 03:18:50 UTC 2018


There is a new pull request by catalyst-joe-guo against master on the Samba Samba Github repository

https://github.com/catalyst-joe-guo/samba optimize-packet-init
https://github.com/samba-team/samba/pull/182

traffic: optimize packet init for better performance
When we run traffic_replay, we are creating millions of Packet objects.
So small change in Packet.__init__ will make big difference.

By initializing packet with converted values without parsing string, the time
cost for 3961148 calls of Packet.__init__ dcrease from 17s to 4s, according
to cProfile.

Signed-off-by: Joe Guo <joeg at catalyst.net.nz>

A patch file from https://github.com/samba-team/samba/pull/182.patch is attached
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: github-pr-optimize-packet-init-182.patch
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20180510/2d2fdb77/github-pr-optimize-packet-init-182.patch>


More information about the samba-technical mailing list