#66 new
bahuvrihi

manifest cache

Reported by bahuvrihi | July 23rd, 2008 @ 12:52 PM | in Tap-1.0.0

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

Comments and changes to this ticket

  • bahuvrihi

    bahuvrihi August 5th, 2008 @ 10:15 AM

    • 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.

  • bahuvrihi

    bahuvrihi September 10th, 2008 @ 10:08 AM

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

    bahuvrihi October 11th, 2008 @ 09:12 AM

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

    bahuvrihi January 3rd, 2009 @ 01:24 PM

    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.

  • bahuvrihi

    bahuvrihi January 3rd, 2009 @ 01:27 PM

    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
  • bahuvrihi

    bahuvrihi January 3rd, 2009 @ 01:30 PM

    Note the at_exit activities should only happen when exiting normally!

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.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

A framework for making configurable, file-based tasks and workflows.

People watching this ticket

Tags

Pages