Dan Kenigsberg has submitted this change and it was merged.

Change subject: virt: Optimize guest agent string filtering
......................................................................


virt: Optimize guest agent string filtering

The filtering gains a bit of speed by:
- NO more calling 'ord'
- Moving all possible restricted chars to the set
- Mapped the chars to unichr and put then into a frozenset
- Having only one if
- Using an array to iterate over the unicode string
- And remove the function call for each element

This brought up a performance gain of ~43%

Change-Id: Ief8da73dc180212b594937e658ae8f5f57c63bac
Bug-Url: https://bugzilla.redhat.com/1179696
Signed-off-by: Vinzenz Feenstra <[email protected]>
Reviewed-on: http://gerrit.ovirt.org/36630
Reviewed-by: Nir Soffer <[email protected]>
Reviewed-by: Francesco Romani <[email protected]>
Reviewed-by: Dan Kenigsberg <[email protected]>
---
M vdsm/virt/guestagent.py
1 file changed, 14 insertions(+), 18 deletions(-)

Approvals:
  Nir Soffer: Looks good to me, but someone else must approve
  Vinzenz Feenstra: Verified
  Dan Kenigsberg: Looks good to me, approved
  Francesco Romani: Looks good to me, but someone else must approve



-- 
To view, visit http://gerrit.ovirt.org/36630
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ief8da73dc180212b594937e658ae8f5f57c63bac
Gerrit-PatchSet: 9
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Vinzenz Feenstra <[email protected]>
Gerrit-Reviewer: Dan Kenigsberg <[email protected]>
Gerrit-Reviewer: Francesco Romani <[email protected]>
Gerrit-Reviewer: Michal Skrivanek <[email protected]>
Gerrit-Reviewer: Nir Soffer <[email protected]>
Gerrit-Reviewer: Vinzenz Feenstra <[email protected]>
Gerrit-Reviewer: [email protected]
Gerrit-Reviewer: oVirt Jenkins CI Server
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to