Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

feature($http): parameter to avoid triggering $apply #14191

Closed

Description

@dragosrususv

PROBLEM: Complex pooling fed screens become unresponsive when they have 4-5 poolers at 2-3 seconds each.

SOLUTION: allow the developer to trigger $apply via $timeout(f(), 0) and allow him to opt out of the $digest cycle on each $http request

PROPOSAL:
$http({...., apply: false}) // by default the $apply will be triggered; if false, it will not be triggered

I can make a PR - just wanted to get in sync with the community, if they reached this problem.
Please mind that I'm forced to consider ReactJS like frameworks due to this limitation.

Activity

  1. changed the title [-]feature($http): parameter to avoid triggering $apply on success/fail[/-] [+]feature($http): parameter to avoid triggering $apply[/+] on Mar 7, 2016
  2. lgalfaso commented on Mar 7, 2016

    @lgalfaso
    Contributor

    There are a few hurdles as $http uses $q extensively, but if the issues can be solved and the implementation is good, I see no problems.

    BTW, do you know that there is $httpProvider#useApplyAsync that can partially solve this?

  3. Narretz commented on Mar 7, 2016

    @Narretz
    Contributor

    Duplicate of #2049

    I'd be happy to include this in a future release.

    Here's a PR that attempted to do this:
    #12557

    There's also this issue, which should be considered when implementing this: #13108

  4. dragosrususv commented on Mar 7, 2016

    @dragosrususv
    Author

    @Narretz thank you kindly - tried to search before but haven't found the other ticket. I'm glad that this is not new to our community and people are interested in keeping good performance in large angularjs apps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions