Skip to content

add highlight render option to Render Performance tab#1685

Merged
RobbieTheWagner merged 13 commits intoemberjs:masterfrom
michaelbdai:bdai/poc
Oct 18, 2021
Merged

add highlight render option to Render Performance tab#1685
RobbieTheWagner merged 13 commits intoemberjs:masterfrom
michaelbdai:bdai/poc

Conversation

@michaelbdai
Copy link
Copy Markdown
Contributor

@michaelbdai michaelbdai commented Sep 3, 2021

Description

for issue #1684
Added a checkbox in the render performance tab/route
When enabled, the component gets highlighted when rends.
See more details in screen recording.

Screenshots

Here is the screen recording and unpacked build
https://drive.google.com/file/d/1jIUPaM69okID1tlroAFu8lead6zeKfi_/view?usp=sharing

@michaelbdai michaelbdai force-pushed the bdai/poc branch 2 times, most recently from 5ce959a to 549c486 Compare September 4, 2021 06:02
@michaelbdai michaelbdai force-pushed the bdai/poc branch 2 times, most recently from 192555d to 1cd3dc7 Compare September 11, 2021 07:02
@nummi
Copy link
Copy Markdown
Contributor

nummi commented Sep 16, 2021

It's beautiful!

Comment thread ember_debug/render-debug.js Outdated
Comment thread ember_debug/render-debug.js Outdated
Comment thread ember_debug/render-debug.js Outdated
Comment thread ember_debug/models/profile-manager.js Outdated
Comment thread ember_debug/models/profile-manager.js Outdated
Comment thread ember_debug/models/profile-manager.js Outdated
@michaelbdai michaelbdai force-pushed the bdai/poc branch 2 times, most recently from 76ac347 to cfcb28f Compare September 27, 2021 17:54
@michaelbdai michaelbdai marked this pull request as ready for review September 27, 2021 17:56
Comment thread ember_debug/models/profile-manager.js Outdated
Comment thread ember_debug/models/profile-manager.js
Comment thread ember_debug/models/profile-manager.js Outdated
Comment thread ember_debug/models/profile-manager.js Outdated
Comment thread ember_debug/models/profile-manager.js Outdated
Comment thread ember_debug/models/profile-manager.js Outdated
Comment thread ember_debug/models/profile-manager.js Outdated
@michaelbdai michaelbdai force-pushed the bdai/poc branch 2 times, most recently from c5a2bd8 to e90228b Compare September 28, 2021 09:47
Comment thread ember_debug/models/profile-manager.js Outdated
Comment thread ember_debug/models/profile-manager.js Outdated
Comment thread ember_debug/models/profile-manager.js Outdated
Comment thread ember_debug/models/profile-manager.js
@michaelbdai michaelbdai marked this pull request as draft October 1, 2021 07:24
@lifeart
Copy link
Copy Markdown
Contributor

lifeart commented Oct 11, 2021

this is performance profile node constructor https://github.com/emberjs/ember-inspector/blob/master/ember_debug/models/profile-node.js#L17

looks like here payload for performance profile node is generated https://github.com/emberjs/ember.js/blob/master/packages/@ember/instrumentation/index.ts

and this is glimmer component manager https://github.com/glimmerjs/glimmer-vm/blob/master/packages/%40glimmer/manager/lib/public/component.ts and yes, looks like it don't have such instrumentation builtin

as part of this mr emberjs/ember.js#19293 glimmer component manager does not belongs to ember itself

and this is emberjs/ember.js#11099 intent to move instrumentation to component managers

@chancancode @rwjblue do you have ideas about way to add rerender instrumentation for glimmer components?

@MelSumner
Copy link
Copy Markdown

@rwwagner90 please review :)

@RobbieTheWagner
Copy link
Copy Markdown
Member

@MelSumner we're not merging new things until the build is fixed and working with beta and canary, but we will definitely review all open PRs when that time comes.

@RobbieTheWagner
Copy link
Copy Markdown
Member

@michaelbdai now that master has passing tests, can you please rebase?

@michaelbdai
Copy link
Copy Markdown
Contributor Author

michaelbdai commented Oct 17, 2021

@rwwagner90 rebased. all tests passing now.

Copy link
Copy Markdown
Member

@RobbieTheWagner RobbieTheWagner left a comment

Choose a reason for hiding this comment

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

Thanks so much for this super in depth PR @michaelbdai! I especially appreciate that you added so many great tests! I just had a few minor questions, but otherwise, this looks good to me.

Comment thread app/controllers/render-tree.js Outdated
Comment thread app/controllers/render-tree.js
Comment thread app/routes/render-tree.js
Comment thread app/controllers/render-tree.js
@RobbieTheWagner RobbieTheWagner merged commit f7e2143 into emberjs:master Oct 18, 2021
@RobbieTheWagner
Copy link
Copy Markdown
Member

Thanks again so much for the PR! 🎉

patricklx pushed a commit to patricklx/ember-inspector that referenced this pull request Sep 19, 2022
* add highlight render option to Render Performance tab

clean up

* fix lint error and change per comment

* Use bounds to find component instead of id

* change per comment

* change per comments

* change per comments

* change per comments

* added test

* replace timeout with later

* use async

* improve tests

* add test for glimmer component, to show the highlight is not supported.

* change per comments

Co-authored-by: Bing Dai <bdai@linkedin.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants