community.general/lib/ansible
Grzegorz Nosek 7f33580eba Fix exponential regex performance issue
filter_leading_non_json_lines effectively does

re.match(".*\w+=\w+.*", line)

for every line of output. This has abysmal performance in case of large
Base64-encoded data (which ultimately does not match the regex but does
match the .*\w+= part) as returned e.g. by the template module (diffs).

Replacing the match with

re.search("\w=\w", line)

drops the complexity back to linear, and actually usable with large
diffs from the template module (a 150 KB Base64 diff kept Ansible
spinning at 100% cpu for minutes).

Also, check the easy cases (line.startswith) first while we're here.

Closes: #8932
2014-08-01 14:46:00 +02:00
..
callback_plugins Remove runner_on_error callback that is never used. 2014-07-01 17:02:10 -04:00
inventory Invalidate host/group variables cache when loading 2014-07-14 15:21:33 +02:00
module_utils Catching shlex splitting error in fact gathering get_cmdline call 2014-07-30 14:47:50 -05:00
playbook Fix parsing of tasks with variable module names 2014-07-30 14:18:06 -05:00
runner Merge branch 'patch-1' of https://github.com/debfx/ansible into debfx-patch-1 2014-07-31 11:41:21 -05:00
utils Fix exponential regex performance issue 2014-08-01 14:46:00 +02:00
__init__.py Version bump for 1.7 2014-05-05 16:37:46 -05:00
callbacks.py Show delegate_to hint in callbacks 2014-07-07 12:39:08 -05:00
color.py Merge commit. 2014-03-16 17:08:26 -04:00
constants.py Revert "Expand variables in configuration files" - I feel I've been here before. 2014-07-28 17:10:42 -04:00
errors.py Update various copyrights. Not complete, but sufficient. 2014-01-04 13:32:04 -05:00
module_common.py Revise documentation on powershell module replacer code. 2014-06-19 14:24:13 -05:00