[augeas-devel] [Augeas] #198: Add context path to decrease load time

Augeas trac at fedorahosted.org
Fri May 6 18:15:49 UTC 2011


#198: Add context path to decrease load time
-------------------------+--------------------------------------------------
 Reporter:  kc7zzv       |       Owner:  lutter
     Type:  enhancement  |      Status:  new   
 Priority:  major        |   Milestone:  next  
Component:  Augeas       |     Version:  0.8.0 
 Keywords:               |  
-------------------------+--------------------------------------------------
 The idea is that you can call Augeas's init function with a 4th parameter
 called "context" or "filter" that will filter the auto-loading.  It may or
 may not change the base of the tree to remove the path.  If it does remove
 the specified section from the path, it should be called "context".  If it
 does not, it should be called something similar to filter.

 The idea comes from http://projects.puppetlabs.com/issues/7285

 Basically this decreases load-time by not reading in files that aren't of
 interest to the user.  I expect this will not give as much of a
 performance boost as manually specifying which lenses and files to load,
 but will be simpler to use.
 [[BR]]
 [[BR]]


 Function call:
 The init function might have a signature of this:
 augeas *aug_init_filter(const char *root, const char *loadpath, const char
 * filter, unsigned int flags);
 [[BR]]
 [[BR]]



 Example usage:
 Augeas is called like normal with a filter of "/etc/ntp.conf".  This would
 automatically tell Augeas to ignore all requests to parse files from the
 lenses that are not in the path "/etc/ntp.conf".
 [[BR]]
 [[BR]]



 Optional:
 Even better would be if the lenses FOR other files aren't loaded, but I
 assume that would be better left for later, if done at all.
 [[BR]]
 [[BR]]

 Note: I left Priority and Milestone at the defaults because I don't know
 what it should be.

-- 
Ticket URL: <https://fedorahosted.org/augeas/ticket/198>
Augeas <http://augeas.net/>
a configuration API




More information about the augeas-devel mailing list