MartijnBraam / python-isc-dhcp-leases

Small python module for reading /var/lib/dhcp/dhcpd.leases from isc-dhcp-server
MIT License
122 stars 46 forks source link

Improved parsing speed of properties #12

Closed andir closed 8 years ago

andir commented 8 years ago

When using findall python seems to be a lot slower compared to using iterator. Also the useless capture group was removed from the result.

coveralls commented 8 years ago

Coverage Status

Coverage remained the same at 100.0% when pulling 66d2eb3d6b5c7d564ac5269fb3e7de5f5307e609 on andir:fix-performance into b8522649fc2fdaf3731cd398479d358aeef15486 on MartijnBraam:master.

MartijnBraam commented 8 years ago

Neat fix as always. Thanks

andir commented 8 years ago

I just did some more local tests but somehow the performance results (in my test case) vary between the original ~5.5 seconds and ~2.5 seconds on an idle system... I'll report back if I figure out what the issue is.