This repository was archived by the owner on Feb 22, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 248
perf: Use precomputed keys with injector for performance reasons. #1100
Merged
+155
−100
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
library angular.static_keys; | ||
|
||
import 'package:di/di.dart'; | ||
import 'module_internal.dart'; | ||
|
||
Key EXCEPTION_HANDLER_KEY = new Key(ExceptionHandler); | ||
Key ROOT_SCOPE_KEY = new Key(RootScope); | ||
Key SCOPE_KEY = new Key(Scope); | ||
Key SCOPE_STATS_CONFIG_KEY = new Key(ScopeStatsConfig); | ||
Key FORMATTER_MAP_KEY = new Key(FormatterMap); | ||
Key INTERPOLATE_KEY = new Key(Interpolate); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,35 @@ | ||
part of angular.core.dom_internal; | ||
library angular.core_dom.static_keys; | ||
|
||
import 'dart:html' as dom; | ||
import 'package:di/di.dart'; | ||
import 'package:angular/core/static_keys.dart'; | ||
import 'package:angular/core_dom/module_internal.dart'; | ||
|
||
export 'package:angular/directive/static_keys.dart' show NG_BASE_CSS_KEY; | ||
export 'package:angular/core/static_keys.dart'; | ||
|
||
// Keys used to call Injector.getByKey and Module.bindByKey | ||
|
||
Key _ANIMATE_KEY = new Key(Animate); | ||
Key _BOUND_VIEW_FACTORY_KEY = new Key(BoundViewFactory); | ||
Key _COMPONENT_CSS_REWRITER_KEY = new Key(ComponentCssRewriter); | ||
Key _DIRECTIVE_MAP_KEY = new Key(DirectiveMap); | ||
Key _ELEMENT_KEY = new Key(dom.Element); | ||
Key _ELEMENT_PROBE_KEY = new Key(ElementProbe); | ||
Key _ELEMENT_PROBE = new Key(ElementProbe); | ||
Key _EVENT_HANDLER_KEY = new Key(EventHandler); | ||
Key _FORMATTER_MAP_KEY = new Key(FormatterMap); | ||
Key _HTTP_KEY = new Key(Http); | ||
Key _INTERPOLATE_KEY = new Key(Interpolate); | ||
Key _NG_BASE_CSS_KEY = new Key(NgBaseCss); | ||
Key _NG_ELEMENT_KEY = new Key(NgElement); | ||
Key _NODE_ATTRS_KEY = new Key(NodeAttrs); | ||
Key _NODE_KEY = new Key(dom.Node); | ||
Key _NODE_TREE_SANITIZER_KEY = new Key(dom.NodeTreeSanitizer); | ||
Key _SCOPE_KEY = new Key(Scope); | ||
Key _SHADOW_ROOT_KEY = new Key(dom.ShadowRoot); | ||
Key _TEMPLATE_CACHE_KEY = new Key(TemplateCache); | ||
Key _TEMPLATE_LOADER_KEY = new Key(TemplateLoader); | ||
Key _TEXT_MUSTACHE_KEY = new Key(TextMustache); | ||
Key _VIEW_CACHE_KEY = new Key(ViewCache); | ||
Key _VIEW_FACTORY_KEY = new Key(ViewFactory); | ||
Key _VIEW_KEY = new Key(View); | ||
Key _VIEW_PORT_KEY = new Key(ViewPort); | ||
Key _WEB_PLATFORM_KEY = new Key(WebPlatform); | ||
Key ANIMATE_KEY = new Key(Animate); | ||
Key BOUND_VIEW_FACTORY_KEY = new Key(BoundViewFactory); | ||
Key COMPILER_KEY = new Key(Compiler); | ||
Key COMPONENT_CSS_REWRITER_KEY = new Key(ComponentCssRewriter); | ||
Key DIRECTIVE_MAP_KEY = new Key(DirectiveMap); | ||
Key ELEMENT_KEY = new Key(dom.Element); | ||
Key ELEMENT_PROBE_KEY = new Key(ElementProbe); | ||
Key EVENT_HANDLER_KEY = new Key(EventHandler); | ||
Key HTTP_KEY = new Key(Http); | ||
Key NG_ELEMENT_KEY = new Key(NgElement); | ||
Key NODE_ATTRS_KEY = new Key(NodeAttrs); | ||
Key NODE_KEY = new Key(dom.Node); | ||
Key NODE_TREE_SANITIZER_KEY = new Key(dom.NodeTreeSanitizer); | ||
Key SHADOW_ROOT_KEY = new Key(dom.ShadowRoot); | ||
Key TEMPLATE_CACHE_KEY = new Key(TemplateCache); | ||
Key TEMPLATE_LOADER_KEY = new Key(TemplateLoader); | ||
Key TEXT_MUSTACHE_KEY = new Key(TextMustache); | ||
Key VIEW_CACHE_KEY = new Key(ViewCache); | ||
Key VIEW_FACTORY_KEY = new Key(ViewFactory); | ||
Key VIEW_KEY = new Key(View); | ||
Key VIEW_PORT_KEY = new Key(ViewPort); | ||
Key WEB_PLATFORM_KEY = new Key(WebPlatform); | ||
Key WINDOW_KEY = new Key(dom.Window); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
library angular.directive.static_keys; | ||
|
||
import 'package:di/di.dart'; | ||
import 'package:angular/directive/module.dart'; | ||
import 'package:angular/core_dom/static_keys.dart'; | ||
|
||
export 'package:angular/core_dom/static_keys.dart'; | ||
|
||
Key NG_CONTROL_KEY = new Key(NgControl); | ||
Key NG_FORM_KEY = new Key(NgForm); | ||
Key NG_BASE_CSS_KEY = new Key(NgBaseCss); |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about adding a note on why we use static keys in those files ?