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

Measure initial render in development mode #128

Merged
merged 1 commit into from
Apr 5, 2023

Conversation

everdimension
Copy link
Member

No description provided.

@everdimension everdimension requested a review from zerts March 28, 2023 16:01
@@ -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
Copy link
Contributor

Choose a reason for hiding this comment

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

А точно обе строки нужны?

Copy link
Member Author

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>
Copy link
Contributor

Choose a reason for hiding this comment

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

👍

}
didRunEffectOnce = true;
}, []);
didRenderOnce = true;
Copy link
Contributor

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
}

Чтобы в одном месте уже всё было, по аналогии с эффектом)

Copy link
Member Author

Choose a reason for hiding this comment

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

ага, я прост двигал и оно там оказалось)

@everdimension everdimension merged commit 11729ed into main Apr 5, 2023
@everdimension everdimension deleted the perf/measure-initial-render branch April 5, 2023 21:46
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.

2 participants