Skip to content

Commit 59f13c7

Browse files
hIkipoohtaehwannohg-pyunBrian
authored
profiler translation pull request (#238)
* Fixed mixed commit other than JSX in Depth * Fix feedback * Update JSX in Depth * delete unnecessary white space * 에러 디코더 번역 완료 * 맞춤법 수정 반영 * 메세지 => 메시지 수정 * Apply prettier * finish translation * Apply suggestions from code review * Apply suggestions from code review * Remove original text Co-authored-by: Taehwan Noh <taehwanno.dev@gmail.com> Co-authored-by: Haegul Pyun <phg2491@gmail.com> Co-authored-by: Brian <hikipooh@itam.games>
1 parent fdba114 commit 59f13c7

File tree

1 file changed

+42
-42
lines changed

1 file changed

+42
-42
lines changed

content/docs/reference-profiler.md

+42-42
Original file line numberDiff line numberDiff line change
@@ -6,22 +6,22 @@ category: Reference
66
permalink: docs/profiler.html
77
---
88

9-
The `Profiler` measures how often a React application renders and what the "cost" of rendering is.
10-
Its purpose is to help identify parts of an application that are slow and may benefit from [optimizations such as memoization](/docs/hooks-faq.html#how-to-memoize-calculations).
9+
`Profiler`React 애플리케이션이 렌더링하는 빈도와 렌더링 "비용"을 측정합니다.
10+
Profiler의 목적은 [메모이제이션 같은 성능 최적화 방법](/docs/hooks-faq.html#how-to-memoize-calculations)을 활용할 수 있는 애플리케이션의 느린 부분들을 식별해내는 것입니다.
1111

12-
> Note:
12+
>주의
1313
>
14-
> Profiling adds some additional overhead, so **it is disabled in [the production build](/docs/optimizing-performance.html#use-the-production-build)**.
14+
> 프로파일링은 약간의 오버헤드를 만들기 때문에 **[프로덕션 빌드](/docs/optimizing-performance.html#use-the-production-build)에서는 비활성화되어 있습니다.**.
1515
>
16-
> To opt into production profiling, React provides a special production build with profiling enabled.
17-
> Read more about how to use this build at [fb.me/react-profiling](https://fb.me/react-profiling)
16+
>프로덕션에서 프로파일링을 활성화하길 원하신다면 React에서 제공하는 특별 프로덕션 빌드를 통해서 활성화하실 수 있습니다.
17+
>다음 링크에서 이 특별 빌드에 대해서 더 읽어보실 수 있습니다 [fb.me/react-profiling](https://fb.me/react-profiling)
1818
19-
## Usage {#usage}
19+
## 사용법 {#usage}
2020

21-
A `Profiler` can be added anywhere in a React tree to measure the cost of rendering that part of the tree.
22-
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.
21+
`Profiler`React 트리 내에 어디에나 추가될 수 있으며 트리의 특정 부분의 렌더링 비용을 계산해줍니다.
22+
이는 두 가지 props를 요구합니다: `id` (문자열) 와 `onRender` 콜백 (함수)이며 React 트리 내 컴포넌트에 업데이트가 "커밋"되면 호출됩니다.
2323

24-
For example, to profile a `Navigation` component and its descendants:
24+
예를 들어, `Navigation` 컴포넌트와 자손 컴포넌트들을 프로파일하기 위해서는
2525

2626
```js{3}
2727
render(
@@ -34,7 +34,7 @@ render(
3434
);
3535
```
3636

37-
Multiple `Profiler` components can be used to measure different parts of an application:
37+
복수의 `Profiler` 컴포넌트로 애플리케이션의 다른 부분들을 계산할 수 있습니다
3838
```js{3,6}
3939
render(
4040
<App>
@@ -48,7 +48,7 @@ render(
4848
);
4949
```
5050

51-
`Profiler` components can also be nested to measure different components within the same subtree:
51+
`Profiler` 컴포넌트는 하위 트리의 다른 컴포넌트들을 계산하기 위해 중첩해서 사용할 수 있습니다
5252
```js{3,5,8}
5353
render(
5454
<App>
@@ -66,54 +66,54 @@ render(
6666
);
6767
```
6868

69-
> Note
69+
>주의사항
7070
>
71-
> Although `Profiler` is a light-weight component, it should be used only when necessary; each use adds some CPU and memory overhead to an application.
71+
>`Profiler`는 가벼운 컴포넌트이지만 필요할 때만 사용해야 합니다. 각 Profiler는 애플리케이션에 조금의 CPU와 메모리 비용을 추가하게 됩니다.
7272
73-
## `onRender` Callback {#onrender-callback}
73+
## `onRender` 콜백 {#onrender-callback}
7474

75-
The `Profiler` requires an `onRender` function as a prop.
76-
React calls this function any time a component within the profiled tree "commits" an update.
77-
It receives parameters describing what was rendered and how long it took.
75+
`Profiler``onRender` 함수를 prop으로 요구합니다.
76+
React는 프로파일 트리 내의 컴포넌트에 업데이트가 "커밋"될 때마다 이 함수를 호출합니다.
77+
이 함수는 무엇이 렌더링 되었는지 그리고 얼마나 걸렸는지 설명하는 입력값을 받게 됩니다.
7878

7979
```js
8080
function onRenderCallback(
81-
id, // the "id" prop of the Profiler tree that has just committed
82-
phase, // either "mount" (if the tree just mounted) or "update" (if it re-rendered)
83-
actualDuration, // time spent rendering the committed update
84-
baseDuration, // estimated time to render the entire subtree without memoization
85-
startTime, // when React began rendering this update
86-
commitTime, // when React committed this update
87-
interactions // the Set of interactions belonging to this update
81+
id, // 방금 커밋된 Profiler 트리의 "id"
82+
phase, // "mount" (트리가 방금 마운트가 된 경우) 혹은 "update"(트리가 리렌더링된 경우)
83+
actualDuration, // 커밋된 업데이트를 렌더링하는데 걸린 시간
84+
baseDuration, // 메모이제이션 없이 하위 트리 전체를 렌더링하는데 걸리는 예상시간
85+
startTime, // React가 언제 해당 업데이트를 렌더링하기 시작했는지
86+
commitTime, // React가 해당 업데이트를 언제 커밋했는지
87+
interactions // 이 업데이트에 해당하는 상호작용들의 집합
8888
) {
89-
// Aggregate or log render timings...
89+
// 렌더링 타이밍을 집합하거나 로그...
9090
}
9191
```
9292

93-
Let's take a closer look at each of the props:
93+
각 prop에 대해 좀 더 자세히 알아보겠습니다
9494

9595
* **`id: string`** -
96-
The `id` prop of the `Profiler` tree that has just committed.
97-
This can be used to identify which part of the tree was committed if you are using multiple profilers.
96+
방금 커밋된 `Profiler` 트리의 `id` prop.
97+
복수의 프로파일러를 사용하고 있다면 트리의 어느 부분이 커밋되엇는지 식별하는데 사용할 수 있습니다.
9898
* **`phase: "mount" | "update"`** -
99-
Identifies whether the tree has just been mounted for the first time or re-rendered due to a change in props, state, or hooks.
99+
해당 트리가 방금 마운트된 건지 prop, state 혹은 hooks의 변화로 인하여 리렌더링 된 건지 식별합니다.
100100
* **`actualDuration: number`** -
101-
Time spent rendering the `Profiler` and its descendants for the current update.
102-
This indicates how well the subtree makes use of memoization (e.g. [`React.memo`](/docs/react-api.html#reactmemo), [`useMemo`](/docs/hooks-reference.html#usememo), [`shouldComponentUpdate`](/docs/hooks-faq.html#how-do-i-implement-shouldcomponentupdate)).
103-
Ideally this value should decrease significantly after the initial mount as many of the descendants will only need to re-render if their specific props change.
101+
현재 업데이트에 해당하는 `Profiler`와 자손 컴포넌트들을 렌더하는데 걸린 시간
102+
이것은 하위 트리가 얼마나 메모이제이션을 잘 활용하고 있는지를 암시합니다 (e.g. [`React.memo`](/docs/react-api.html#reactmemo), [`useMemo`](/docs/hooks-reference.html#usememo), [`shouldComponentUpdate`](/docs/hooks-faq.html#how-do-i-implement-shouldcomponentupdate)).
103+
이상적으로 대다수의 자손 컴포넌트들은 특정 prop이 변할 경우에만 리렌더링이 필요하기 때문에 이 값은 초기 렌더링 이후에 상당 부분 감소해야 합니다.
104104
* **`baseDuration: number`** -
105-
Duration of the most recent `render` time for each individual component within the `Profiler` tree.
106-
This value estimates a worst-case cost of rendering (e.g. the initial mount or a tree with no memoization).
105+
`Profiler` 트리 내 개별 컴포넌트들의 가장 최근 `render` 시간의 지속기간
106+
이 값은 렌더링 비용의 최악 케이스를 계산해줍니다(e.g. 초기 마운트 혹은 메모이제이션이 없는 트리)
107107
* **`startTime: number`** -
108-
Timestamp when React began rendering the current update.
108+
React가 현재 업데이트에 대해 렌더링을 시작한 시간의 타임 스탬프.
109109
* **`commitTime: number`** -
110-
Timestamp when React committed the current update.
111-
This value is shared between all profilers in a commit, enabling them to be grouped if desirable.
110+
React가 현재 업데이트를 커밋한 시간의 타임 스탬프
111+
이 값은 모든 프로파일러들이 공유하기 때문에 원한다면 그룹을 지을 수 있습니다.
112112
* **`interactions: Set`** -
113-
Set of ["interactions"](https://fb.me/react-interaction-tracing) that were being traced when the update was scheduled (e.g. when `render` or `setState` were called).
113+
업데이트가 계획되었을 때 추적하고 있던 ["상호작용"](https://fb.me/react-interaction-tracing)의 집합 (e.g. `render` 혹은 `setState`가 호출되었을 때).
114114

115-
> Note
115+
>주의
116116
>
117-
> Interactions can be used to identify the cause of an update, although the API for tracing them is still experimental.
117+
>상호작용을 추적하는 API는 아직 시험단계에 있지만, 상호작용은 업데이트의 원인을 식별하는데 사용할 수 있습니다
118118
>
119-
> Learn more about it at [fb.me/react-interaction-tracing](https://fb.me/react-interaction-tracing)
119+
>다음의 링크에서 더 자세히 알아볼 수 있습니다 [fb.me/react-interaction-tracing](https://fb.me/react-interaction-tracing)

0 commit comments

Comments
 (0)