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

Fix for lotus/lotus issue 185 - Performance issue with rendering a partial view #86

Merged
merged 19 commits into from Jan 29, 2016

Commits on Dec 31, 2015

  1. Add View::Configuration#partials and failing test

    The framework configuration object should hold a collection of all the
    partials in the file system for the given load paths.
    stevehook committed Dec 31, 2015
    Configuration menu
    Copy the full SHA
    bb1c8b8 View commit details
    Browse the repository at this point in the history

Commits on Jan 1, 2016

  1. Move partial load test to load_test.rb

    view_test.rb doesn't actually load the framework
    stevehook committed Jan 1, 2016
    Configuration menu
    Copy the full SHA
    563738c View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    36fcaba View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    82fead1 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    a80cd02 View commit details
    Browse the repository at this point in the history

Commits on Jan 2, 2016

  1. Configuration menu
    Copy the full SHA
    bd0b5cb View commit details
    Browse the repository at this point in the history
  2. Fix intermittent test failures in load_test.rb

    This seems to be failing because other tests are overwritting the
    `configuration.root` path causing a side effect in this test. Solution
    is to explicitly reload the configuration with a known root path value.
    stevehook committed Jan 2, 2016
    Configuration menu
    Copy the full SHA
    13bab96 View commit details
    Browse the repository at this point in the history
  3. Refactor partial file search into PartialTemplatesFinder

    Also add some tests to assert that the cache is actually being used
    rather than re-reading the partial template files
    stevehook committed Jan 2, 2016
    Configuration menu
    Copy the full SHA
    aee8de6 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    fede385 View commit details
    Browse the repository at this point in the history

Commits on Jan 3, 2016

  1. Configuration menu
    Copy the full SHA
    50b8ad4 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    db0eecd View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    8a4ba05 View commit details
    Browse the repository at this point in the history
  4. Use the correct configuration for the given view in partial lookup

    I'm still not sure I fully understand the configuration hierarchy but
    I think this handles the case in which there are multiple applications
    in the same process.
    
    Also force the format keys to be symbols.
    stevehook committed Jan 3, 2016
    Configuration menu
    Copy the full SHA
    7a22a32 View commit details
    Browse the repository at this point in the history
  5. Remove fall-back to old implementation in PartialFinder

    We need to explicitly reload the configuration in some of the tests to
    make this work. The common code is factored out into
    reload_configuration_helper.rb.
    stevehook committed Jan 3, 2016
    Configuration menu
    Copy the full SHA
    e5d804c View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    c401f83 View commit details
    Browse the repository at this point in the history
  7. Make PartialTemplatesFinder.find_partials a class method

    Also fix inconsistency in Configuration#load_partials!
    stevehook committed Jan 3, 2016
    Configuration menu
    Copy the full SHA
    01de8c0 View commit details
    Browse the repository at this point in the history

Commits on Jan 16, 2016

  1. Add integrations tests for partials

    Created two new applications in fixtures because extending Store and
    CardDeck caused too many side-effects in/from existing tests
    stevehook committed Jan 16, 2016
    Configuration menu
    Copy the full SHA
    184e505 View commit details
    Browse the repository at this point in the history
  2. Refactor to encapsulate Configuration partial cache impl details

    PartialFinder shouldn't have knowledge of the Configuration objects
    internal data structures
    stevehook committed Jan 16, 2016
    Configuration menu
    Copy the full SHA
    3c06cbd View commit details
    Browse the repository at this point in the history

Commits on Jan 18, 2016

  1. Some amends suggested in code review

    Add default encoding to the partial template
    Introduce `PartialFile` class to eliminate data clump
    Instantiate `PartialTemplatesFinder` with instance of configuration
    Remove redundant `PartialFinder#find_cached_template` method
    stevehook committed Jan 18, 2016
    Configuration menu
    Copy the full SHA
    94fbb3d View commit details
    Browse the repository at this point in the history