-
Notifications
You must be signed in to change notification settings - Fork 216
feat(Scope): Instrument Scope to use User tags in Dart Obervatory #1138
Conversation
lib/core/scope.dart
Outdated
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.
could you reuse a static/final tag instead of creating a new one each time ?
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.
+1 to @vicb's comment
@jbdeboer related to #1119, wouldn't all user code be run using scope.watch? If this is OK to assume we could expose a public version of scope.watch() which would set the correct tags when using. Internally we could use different scope.watch method which would set the correct flags for internal usage. Something like:
Not sure if this is the right approach.. I'm still thinking this through... Any suggestions are welcome :) |
lib/core/scope.dart
Outdated
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.
moved locally to the functions
Btw, it's an interesting insight that reaction function during digest is by far the most expensive in this example. |
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.
UserTags need to be stored in global variable. We can't be making new ones ever time this code runs.
Nice work. Just make sure that we don't constantly create new tags. |
LGTM, Otherwise |
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.
use List instead of Map. Initialize List size from ScopeTTL
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.
Done
Also instrument View creation. This can be done in ViewFactory https://github.com/angular/angular.dart/blob/master/lib/core_dom/tagging_view_factory.dart#L21 |
@markovuksanovic @tbosch How do we know this change doesn't cause a performance regression in production mode (when tags are not needed?) |
@jbdeboer I guess the only way to answer your question is to run some benchmarks. Do you know if there are some benchmarks that are already in place which could be used for this? I've seen some benchmarks added recently. |
The tests I have run do not show any impact on performance. Changing tags On Tue, Jun 24, 2014 at 6:59 AM, Marko Vuksanovic notifications@github.com
|
No description provided.