-
Notifications
You must be signed in to change notification settings - Fork 384
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
perf: large data with tree grid #1916
Conversation
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.
κ°μ μ΄ λμμΌλ©΄ μ’κ² λ€κ³ μκ°νλ λΆλΆμ μ½λ©νΈ λ¨κΉλλ€. μκ°μ΄ λ무 λ§μ΄ λ€κ±°λ μ΄λ ΅λ€κ³ μκ°νλ€λ©΄ ν¨μ€ν΄λ λ©λλ€.
@@ -184,6 +184,20 @@ export function partialObservable<T extends Dictionary<any>>(obj: T, key: string | |||
makeObservableData(obj, obj, key, storage, propObserverIdSetMap); | |||
} | |||
|
|||
export function unobservable<T extends Dictionary<any>>(obj: T, keys: Array<keyof T> = []) { |
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.
μ΄ ν¨μκ° νλ μν μ΄ κΈ°μ‘΄ κ°μ²΄λ₯Ό getOriginObject
λ₯Ό νΈμΆν΄μ λ°νλ μΌλ° κ°μ²΄μ μ΄λ»κ² λ€λ₯΄μ£ ?
μ²μμλ μ£Όμ΄μ§ ν€λ§ observable
μ ν΄μ νλ€κ³ μ΄ν΄ν μλ μκ² λλ°, obj.__storage__
κΉμ§ ν΅μΌλ‘ λ 리면 λ¬Έμ κ° μλμ?
μμ μλ¬Έμ΄ λ€λ€ 보λ μ΄ ν¨μλ λμμ΄ λΆμ νν΄λ³΄μ
λλ€. ν΄λΉ μμ±μ observerInfoMap
μμ μ κ±°νλ λμμ΄ λ³΄μ΄μ§ μκΈ° λλ¬Έμ
λλ€. κ·Έλ¬λ©΄ μ μ λΆνμν λ©λͺ¨λ¦¬ λλΉκ° λ°μν μ μμ΅λλ€.
λ§μ½ getOriginObject
λ₯Ό νμ©νλ λ°©μμΌλ‘ λ체ν μ μμμ§ μλλ©΄ observe
ν¨μλ₯Ό νΈμΆνκ³ λ¦¬ν΄λλ unobserve
ν¨μ λ±μ νμ©ν λ°©λ²μ μμμ§ κΆκΈνλ€μ.
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.
getOriginObject
λ₯Ό μ¬μ©νλλ‘ λ³κ²½νμ΅λλ€.
κ·Έλ¦¬κ³ __storage__
λ₯Ό μμ νμ§ μλλ‘ μμ ν΄μ obj
λ₯Ό λ€μ observableλ‘ λ³κ²½νμ§ μμΌλ―λ‘ observerInfoMap
μ λΆνμν λ°μ΄ν°κ° μΆμ λμ§ μμ΅λλ€. λ¨μ§ obj
μ μ£Όμ΄μ§ μμ±λ§ unobservableλ‘ λ³κ²½νλ μ νν λμμ μννλ ν¨μλ‘ λ체 νμ΅λλ€.
} | ||
|
||
type Props = OwnProps & StoreProps & DispatchProps; | ||
|
||
class BodyRowsComp extends Component<Props> { | ||
private getVisibleStateOfRows({ rawData, rows }: Pick<Props, 'rows' | 'rawData'>) { |
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.
μ΄ λ‘μ§μ λ·° λ μ΄μ΄μμ νμΈνλκ² μλλΌ collapseλ₯Ό dispatchν λ ν΄λΉ Rowκ° λ³΄μ¬λ λλμ§ μ¨κ²¨μΌ λλμ§λ₯Ό 미리 κ°μ§κ³ μλλ‘ λ§λ€ μ μλμ?
λ·° λ μ΄μ΄μ 볡μ‘λκ° λΆνμνκ² μ¬λΌκ°λ λμμΌλ‘ 보μ λλ€.
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.
μ€ν¬λΌ λ λ§μλλ¦° κ²κ³Ό κ°μ΄, Rowμ hidden
μ 보λ₯Ό rawData
μ κ°μ§κ³ μμ΄μ μ΄λ₯Ό νμΈνλ λ‘μ§μ΄ μνλκ² λ©λλ€. browserStack λ±κ³Ό κ°μ΄ μ μ¬μ νκ²½μμ νμΈν΄λ³Έ κ²°κ³Ό, λμ μνμ λλ μ΄κ° μμ ν μ¬λΌμ§μ§λ μμμ§λ§ ν
μ€νΈ νκ²½κ³Ό λ§μ°¬κ°μ§λ‘ μ½ 2000λ°° κ°λμ μ±λ₯ ν₯μμ΄ μλ κ²μΌλ‘ νμΈ λμμ΅λλ€.
μ΄μ κ΄λ ¨ν΄μλ μ°μ λ°°ν¬ ν, κ΄λ ¨ν΄μ μΆκ° κ°μ μ΄ νμνκ² λλ©΄ μΆν ꡬ쑰 λ±μ κ°μ νλλ‘ νκ² μ΅λλ€.
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.
리뷰 μλ£ν©λλ€.
getVisibleStateOfRows
μ체 볡μ‘λκ° λκΈ΄νλ° μ μ¬μνκ²½μμ ν
μ€νΈ μ‘°κΈλ§ λ λλ €λ³΄μκ³ λ¬Έμ κ° μλμ§ νμΈ λ°λλλ€. λ§μ½ μ΄μκ° μλ€λ©΄ λ°νν λ μ°λ rawData.reduce
λ₯Ό λΉλκΈ° μ²λ¦¬νλ λ± ν λ² λμ΄λ΄μΌν μλ μκ² μ΄μ.
Please check if the PR fulfills these requirements
fix #xxx[,#xxx]
, where "xxx" is the issue number)Description
Thank you for your contribution to TOAST UI product. π π β¨