I'm open to the idea of parse_yaml_from_file caching small files in memory if vault decoded.
On Thu, Jun 5, 2014 at 2:33 PM, Serge van Ginderachter < [email protected]> wrote: > I have a couple of patches in queue that might help on this (though not > the core issue if the extra time is due to vault): > > https://github.com/ansible/ansible/pulls/sergevanginderachter > > especially this one: > > https://github.com/ansible/ansible/pull/6734 > > Can you test this patch set? You could also test with my 'integration' > branch that has all those pathches merged in with 1.7 devel (currently last > updated some weeks ago). > > https://github.com/sergevanginderachter/ansible/tree/INTEGRATION > > Given you load the encrypted file as a var file, it might not address your > use case, but it might help loading 110 yaml files (assuming those are > primarily group/host_vars files. > > > Serge > > > > > On 5 June 2014 19:07, <[email protected]> wrote: > >> >Are all of the files you're referencing vault-encrypted, or does the >> slowness come from the initialization of the VaultLib? >> >> Only one file is vault encrypted, but (almost) every role references it >> as a vars file. I don't know which part in particular is slow; I noticed >> the delay after an open() on the vault file when stracing ansible and then >> just confirmed it decrypted the file each time without digging any further. >> >> >> > It might be better to cache that object based on the encryption method >> and/or hashed password rather than the unencrypted contents of the YAML >> files themselves. >> >> The choice to cache the parsed YAML rather than something lower down the >> chain was made because that avoided the most work for ansible and, since I >> know YAML files don't changes during execution, seemed safe. An initial >> attempt only cached the decryption result, which already improved speeds >> considerably but was still about three times as slow as caching the lot. >> >> I just tried caching only the VaultAES256 object instead of the above >> approach, but that made no difference to the start up time. >> >> --J >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Ansible Project" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected]. >> To post to this group, send email to [email protected]. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/ansible-project/a252a080-a0e6-40da-9467-3359e91f93c3%40googlegroups.com >> <https://groups.google.com/d/msgid/ansible-project/a252a080-a0e6-40da-9467-3359e91f93c3%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> >> For more options, visit https://groups.google.com/d/optout. >> > > -- > You received this message because you are subscribed to the Google Groups > "Ansible Development" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CA%2BnsWgxYCuQ_e48W2x7FS9Rcn%3DGfbuVFGcOH2Bd82Yp7WSs06A%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
