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

React components profiler #59

Merged
merged 8 commits into from
Jun 17, 2023

Conversation

nafistiham
Copy link
Collaborator

No description provided.

@github-actions
Copy link

github-actions bot commented Jun 14, 2023

Size changes

📦 Next.js Bundle Analysis for react-dev

This analysis was generated by the Next.js Bundle Analysis action. 🤖

Three Pages Changed Size

The following pages changed size from the code in this PR compared to its base branch:

Page Size (compressed) First Load
/404 75.96 KB (🟡 +155 B) 179.12 KB
/500 75.96 KB (🟡 +155 B) 179.11 KB
/[[...markdownPath]] 77.37 KB (🟡 +155 B) 180.53 KB
Details

Only the gzipped size is provided here based on an expert tip.

First Load is the size of the global bundle plus the bundle for the individual page. If a user were to show up to your website and land on a given page, the first load size represents the amount of javascript that user would need to download. If next/link is used, subsequent page loads would only need to download that page's bundle (the number in the "Size" column), since the global bundle has already been downloaded.

Any third party scripts you have added directly to your app using the <script> tag are not accounted for in this analysis

Next to the size is how much the size has increased or decreased compared with the base branch of this PR. If this percentage has increased by 10% or more, there will be a red status indicator applied, indicating that special attention should be given to this.


* Profiling adds some additional overhead, so **it is disabled in the production build by default.** To opt into production profiling, you need to enable a [special production build with profiling enabled.](https://fb.me/react-profiling)

Choose a reason for hiding this comment

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

লাইনের অমিল আছে।


#### সতর্কতা {/*caveats*/}

* প্রোফাইলিং কিছু অতিরক্ত কাজ বাড়ায়, তাই এটা **প্রোডাকশন বিল্ডে স্বাভাবিকভাবে বন্ধ থাকে।** প্রোডাকশন প্রোফাইলিং করতে, আপনাকে [প্রোফাইলিং সক্রিয় আছে এমন একটি বিশেষ প্রোডাকশন বিল্ড](https://fb.me/react-profiling) চালু করতে হবে।

Choose a reason for hiding this comment

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

অতিরক্ত আছে।

@@ -77,7 +79,7 @@ Wrap the `<Profiler>` component around a React tree to measure its rendering per
</App>
```

It requires two props: an `id` (string) and an `onRender` callback (function) which React calls any time a component within the tree "commits" an update.
এর দুটি প্রপ প্রয়োজন হয়ঃ একটা `id` (স্ট্রিং) এবং একটি `onRender` কলব্যাক (ফাংশন) which React calls any time a component within the tree "commits" an update.

<Pitfall>

Choose a reason for hiding this comment

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

এখানে বাদ গেছে onubad.

@@ -126,7 +128,7 @@ You can also nest `<Profiler>` components:
</App>
```

Although `<Profiler>` is a lightweight component, it should be used only when necessary. Each use adds some CPU and memory overhead to an application.
যদি `<Profiler>` একটা হালকা কম্পোনেন্ট, এটা শুধুমাত্র তখনি ব্যবহার করা উচিত যখন প্রয়োজন পড়ছে। প্রতি বার ব্যবহারে অ্যাপের CPU এবং Memory এর উপরে অতিরিক্ত কিছু চাপ পড়ে।

Choose a reason for hiding this comment

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

যদিও হবে।

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

All changes are done.

Copy link
Collaborator

@moshfiqrony moshfiqrony left a comment

Choose a reason for hiding this comment

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

LGTM

@moshfiqrony moshfiqrony added this pull request to the merge queue Jun 17, 2023
Merged via the queue into reactjs:main with commit 74ad3a4 Jun 17, 2023
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.

3 participants