• Nick Stenning's avatar
    Only make one request for features data at once · 726ecc0b
    Nick Stenning authored
    This was a fun bug. If multiple feature checks are done in rapid
    succession when the features cache is empty (such as, for example,
    during the first digest cycle at application boot time) then the
    features client would keep kicking off HTTP requests until the first one
    returned.
    
    This would clearly be a misfeature, but wouldn't actually have caused
    any problems but for the fact that the spinner in
    `h/directives/simple-search.coffee` does this to determine whether to
    spin:
    
        scope.$watch (-> $http.pendingRequests.length), (pending) ->
          scope.loading = (pending > 0)
    
    This means that kicking off dozens of requests at a time keeps
    invalidating the digest cycle (because the value of
    `$http.pendingRequests.length` keeps changing), so it never ends. The
    result is the ever-horrible `infdig` (infinite digest cycle) error from
    Angular: https://docs.angularjs.org/error/$rootScope/infdig.
    726ecc0b
Name
Last commit
Last update
..
annotation-mapper-test.coffee Loading commit data...
annotation-sync-test.coffee Loading commit data...
annotation-ui-controller-test.coffee Loading commit data...
annotation-ui-sync-test.coffee Loading commit data...
annotation-ui-test.coffee Loading commit data...
annotation-viewer-controller-test.coffee Loading commit data...
app-controller-test.coffee Loading commit data...
auth-test.coffee Loading commit data...
blocklist-test.js Loading commit data...
bridge-test.coffee Loading commit data...
cross-frame-test.coffee Loading commit data...
discovery-test.coffee Loading commit data...
features-test.js Loading commit data...
form-respond-test.coffee Loading commit data...
host-test.coffee Loading commit data...
identity-test.coffee Loading commit data...
local-storage-test.coffee Loading commit data...
permissions-test.coffee Loading commit data...
search-filter-test.coffee Loading commit data...
session-test.coffee Loading commit data...
store-test.coffee Loading commit data...
stream-controller-test.coffee Loading commit data...
streamer-test.coffee Loading commit data...
tags-test.coffee Loading commit data...
threading-test.coffee Loading commit data...
time-test.coffee Loading commit data...
unicode-test.coffee Loading commit data...
view-filter-test.coffee Loading commit data...
widget-controller-test.coffee Loading commit data...