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

Perf: Potential source of jank. #33

@BleuShan

Description

@BleuShan

While looking at the source, I've stumbled upon those lines three lines:

$timeout(function() {
scope.$apply();

$timeout(function() {
scope.$apply();

$timeout(function() {
scope.$apply();

Given that $timeout, when it resolves, calls $rootScope#$apply, it is somewhat redundant to call $scope.$apply within a $timeout callback. In some context its a potential source of jank because you might be forcing angular to re-digest the whole DOM.

You might consider removing those three lines or replacing $timeout with setTimeout.
I did some testing and had some UI responsiveness issues when resizing some grid items which was alleviated with the removal.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions