On 05/05/11 15:43, Patrick wrote: > > On May 5, 2011, at 6:28 AM, Jennings, Jared L CTR USAF AFMC 46 SK/CCI wrote: > >> Hi, Aaron. >> >> Aaron (quoting letter@): >>> To avoid that, I added 'lens' and 'incl' parameters to the puppet type >>> a while ago. If you set these, Augeas will only read a specific file, >>> avoiding most of the unnecessary overhead. >>> ... everything will be lightning fast, even without >>> connection caching." >> >> Me: >>> I know I can avoid [Augeas populating its whole tree] by specifying >>> the lens and incl parameters in my augeas resources, but I like the >>> clarity I get by not doing that, and want to preserve it. >> >> The reason I brought the issue up is that I wanted to know why Augeas >> connections are not cached. I think they should be, but someone on this >> list may have tried to make that change, failed, and gained wisdom.
I've yet to try, but it's a tricky request as it's mean having ways to ensure the tree is in a sane state each time. > I can tell you one reason why. One of the most expensive parts of starting > Augeas is scanning the whole filesystem (or at least all auto-included files, > of which there are a lot) and making that into a tree. It would need to > rescan every file before processing each resource. I think modern versions > do this by checking the mtime of every file, which is expensive, though > better than parsing all from scratch. > > Still, I would make a random guess that caching the connections might > actually be slower than using noautoinclude. Indeed, I came to the same conclusion. The way I've proposed doing this (as implemented in the patch for #7285) is to use noautoload, then strip out those files that don't match the context - if it's supplied. You still need the autoinclude as you need to know both the lens and the file, you can't just specify the file. -- Dominic Cleal Red Hat Consulting m: +44 (0)7818 512168 -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.