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.

checking xsrf before checking cache unnecessarily slows component rendering #7717

Closed
@jeffbcross

Description

@jeffbcross

@jbdeboer found an issue in AngularDart which was implemented the same as AngularJS.

Concerning fetching cached templates within $http, the service is checking xsrf tokens before checking the cache for the template, which was adding ~2ms to template load time for each component that used templateUrl. For a page with 500 components in use (e.g. button components in a table), this could add 1s to page rendering time. See:

var xsrfValue = urlIsSameOrigin(config.url)

A nice performance gain can be achieved by moving this xsrf logic to after the cache check.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions