-
Notifications
You must be signed in to change notification settings - Fork 32
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
Measure initial render in development mode #128
Conversation
@@ -12,6 +12,10 @@ import { queryClient } from './shared/requests/queryClient'; | |||
import { emitter } from './shared/events'; | |||
|
|||
applyDrawFix(); | |||
if (process.env.NODE_ENV === 'development') { | |||
console.time('UI render'); // eslint-disable-line no-console |
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.
А точно обе строки нужны?
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.
Ага, и то и то ориентиры важные
@@ -243,6 +277,9 @@ function OverviewComponent() { | |||
</div> | |||
<Spacer height={20} /> | |||
<ActionButtonsRow /> | |||
<DevelopmentOnly> |
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.
👍
} | ||
didRunEffectOnce = true; | ||
}, []); | ||
didRenderOnce = true; |
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.
Я бы наверно сюда бы поставил
if (!didRenderOnce) {
console.timeEnd('UI render'); // eslint-disable-line no-console
}
Чтобы в одном месте уже всё было, по аналогии с эффектом)
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.
ага, я прост двигал и оно там оказалось)
No description provided.