Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing instrumentation for compilation/lookup phase #15085

Merged
merged 4 commits into from
Apr 5, 2017

Conversation

jpadilla
Copy link
Contributor

@jpadilla jpadilla commented Mar 27, 2017

Opening this for further discussion and feedback. Aims to fix #14974

cc: @paddyobrien @ghedamat

@jpadilla jpadilla force-pushed the ember-instrument-compiliation branch from 52628b3 to 99cca3e Compare March 27, 2017 21:52
return this._definitionCache.get({ name, source, owner });
let definition = this._definitionCache.get({ name, source, owner });
if (definition) {
definition.finalizer = finalizer;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mixonic notes that this may not work as expected if the same component is used multiple times.

definition.finalizer = finalizer;
} else {
finalizer();
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not clear that two control flows (with and without definition) are being weighed the same way. @rwjblue suggests always calling the finalizer at the end of the is method, and changing the instrumentation identifier to something more specific like 'render.getComponentDefinition' and then add other separate instrumentations for other parts of the code.

@jpadilla
Copy link
Contributor Author

Just pushed changes based on feedback from Merge Party at EmberConf

@stefanpenner
Copy link
Member

@mmun are you good with the improvements?

@stefanpenner stefanpenner merged commit e255d73 into emberjs:master Apr 5, 2017
@jpadilla
Copy link
Contributor Author

jpadilla commented Apr 5, 2017

@mmun @stefanpenner awesome, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Ember.instrument misses compilation/lookup phase.
3 participants