Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimize load #10

Merged
merged 8 commits into from Oct 12, 2016
Prev

changes from review

  • Loading branch information...
jreidinger committed Oct 12, 2016
commit d892547eb5921ea37078b1cc86e53d05691d0aac
@@ -273,13 +273,15 @@ def report_error(aug)
# prevent too many aug.match calls which are expensive.
class AugeasKeysCache
STORE_PREFIX = "/store".freeze
STORE_LEN = 6
STORE_LEN_1 = 7
STORE_LEN = STORE_PREFIX.size
STORE_LEN_1 = STORE_LEN + 1

# initialize cache from passed augeas object
def initialize(aug)
fill_cache(aug)
end

This comment has been minimized.

Copy link
@lslezak

lslezak Oct 12, 2016

I miss some documentation comments in this file...

# returns list of keys available on given prefix
def keys_for_prefix(prefix)
cut = prefix.length > STORE_LEN ? STORE_LEN_1 : STORE_LEN
path = prefix[cut..-1]
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.