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

Cache index keys in $indexFor #460

Closed
wants to merge 4 commits into from
Closed

Cache index keys in $indexFor #460

wants to merge 4 commits into from

Commits on Nov 13, 2014

  1. Simplify $$updated method to only perform data updates and return a b…

    …oolean. $$notify now called by SyncObject.
    katowulf committed Nov 13, 2014
    Configuration menu
    Copy the full SHA
    80a40b0 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    b587e18 View commit details
    Browse the repository at this point in the history

Commits on Nov 14, 2014

  1. Simplify $$ methods in $FirebaseArray

    src/FirebaseArray.js
     - _notify renamed to $$notify
     - _process renamed to $$process
     - $$process no longer called internally by $$added/$$updated/$$moved/$$removed
     - $$added now returns a record
     - $$updated now returns a boolean indicating whether anything changed
     - $$moved now returns a boolean indicating whether record should be moved
     - $$removed now returns a boolean indicating whether record should be removed
    src/firebase.js: SyncArray to support new $$process usage
     - $$process now called after $$added, $$updated, $$removed, and $$moved (instead of coupled to those methods)
     - $$updated, $$moved, and $$removed only called if rec exists in the array
    test/jasmineMatchers.js: added toHaveCallCount(), toBeEmpty(), and toHaveLength()
    katowulf committed Nov 14, 2014
    Configuration menu
    Copy the full SHA
    38e7a36 View commit details
    Browse the repository at this point in the history
  2. Optimize $indexFor by caching index locations in a weak map

    src/FirebaseArray.js: added a cache of record indices
    test/unit/firebase.spec.js: Fix broken test case
    test/mocks/mock.utils.js: unused parameter
    katowulf committed Nov 14, 2014
    Configuration menu
    Copy the full SHA
    75a3f96 View commit details
    Browse the repository at this point in the history