Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

manifest cache

#66

Manifest information could easily be cached... perhaps globally, and timestamped such that only files that were modified since that time will be re-manifested. This only really is an issue for task and generators, which must be scanned to identify whether or not it should be manifested.

The benefit could be significant as basically all gem files could be skipped after their initial scan.

You might consider using two manifest flags: -T for a full re-scan and -t for a quick list

Reported by bahuvrihi · July 23rd, 2008 @ 12:52 PM

State: new
Milestone: Tap-1.0.0
Assigned to: nobody

Activity

  1. bahuvrihi
    bahuvrihi
    • Title changed from Fast manifest to manifest cache

    Caching can be a global option, and working with/reseting the manifest could occur through an 'env' command.

    August 5th, 2008 @ 10:15 AM

  2. bahuvrihi
    bahuvrihi
    • Milestone changed from Tap-1.0.0 to Tap-0.11.0

    September 10th, 2008 @ 10:08 AM

  3. bahuvrihi
    bahuvrihi
    • Milestone changed from Tap-0.11.0 to Tap-1.0.0
    • Tag changed from feature, tap to feature, tap

    October 11th, 2008 @ 09:12 AM

  4. bahuvrihi
    bahuvrihi

    Here's a possible structure:

    
      user_home/.tap/
        cache
          gems/gem-name-version.rb
          user-env-index.rb
    
        cache.rb
        tap.yml
    

    The tap.yml file is the global config file. Loading cache.rb will add Env.instances mapping original paths to cache files.

    If a cache file is older than original/tap.yml, the cache is automatically removed or recreated. (hence tapping tap.yml is an easy way to recreate a cache)

    Cache files should instantiate the Env. This makes dump/load pretty easy... just make some valid ruby dump, basically by inspecting the relevant hashes. Gems should still be activated from the cache, to ensure that nothing goes screwy. Adding a

    
      gem 'gem-name'
    

    To the cache file should be sufficient.

    January 3rd, 2009 @ 01:24 PM

  5. bahuvrihi
    bahuvrihi

    To regenerate a manifest, use something like the manifest command which already loads all gems. Delete files beforehand.

    When caching:

    • load cache before adding anything to Env.instances
    • mark any new instances
    • at exit, resolve the full manifests for each instance and generate cache files
    • at exit, regenerate/append instances.rb

    January 3rd, 2009 @ 01:27 PM

  6. bahuvrihi
    bahuvrihi

    Note the at_exit activities should only happen when exiting normally!

    January 3rd, 2009 @ 01:30 PM

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.