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
Description
@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:
Line 605 in ff03698
A nice performance gain can be achieved by moving this xsrf logic to after the cache check.