Skip to content

Conversation

SungMinCho-Kor
Copy link
Contributor

@SungMinCho-Kor SungMinCho-Kor commented Feb 21, 2024

⭐️ Issue Number

🚩 Summary

  • 앱 반응속도 개선

🛠️ Technical Concerns

debounce vs throttle

모든 사용자 동작을 debounce로 처리하여 사용자의 동시동작을 방지했다.
하지만 debounce의 경우 정해진 시간동안 앱의 반응이 지연되는 크리티컬한 UX 저하가 있었다.
그래서 throttle을 사용하여 첫 동작에 반응하고 이후 시간동안 동작을 방지하는 방법으로 개선했다.

  • 개선전
.debounce(.milliseconds(100), scheduler: MainScheduler())
  • 개선후
.throttle(.milliseconds(10), latest: false, scheduler: MainScheduler())

map didTap, marker touchHandler의 한계 극복

NMapsMap SDK는 map didTap과 marker의 touchHandler를 제공한다.
하지만 마커를 선택하고 맵을 선택하는 것과 실제 didTap과 touchHandler가 작동하는 그 사이에 약간의 시간 텀이 존재했다.
그래서 didTap과 touchHandler에서 동시 동작을 방지하더라도 시간 텀으로 인한 오류가 발생했다.
이를 해결하고자 모든 동작에 didTap과 touchHandler가 실행되는 시간을 대략적으로 측정하여 모든 사용자 동작에 대한 반응을 지연시켜서 해결했었다.
이로 인해 앱의 반응속도가 특정 기간동안 계속하여 지연되는 현상이 발생했다.
이를 didTap과 touchHanlder에서 현재 동시동작이 disable인지 enable인지 확인하는 것으로 해결했다.

@SungMinCho-Kor SungMinCho-Kor added the 🛠️ Fix 오류, 버그 수정 label Feb 21, 2024
@SungMinCho-Kor SungMinCho-Kor added this to the 5.0 milestone Feb 21, 2024
@SungMinCho-Kor SungMinCho-Kor requested a review from k2645 February 21, 2024 07:46
Copy link
Contributor

@k2645 k2645 left a comment

Choose a reason for hiding this comment

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

정말 속이 다 시원하네요..👍

@SungMinCho-Kor SungMinCho-Kor merged commit dba653b into develop Feb 21, 2024
@SungMinCho-Kor SungMinCho-Kor deleted the feature/refactor-reaction-speed(#309) branch February 21, 2024 07:47
@SungMinCho-Kor SungMinCho-Kor linked an issue Aug 30, 2024 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🛠️ Fix 오류, 버그 수정
Projects
None yet
Development

Successfully merging this pull request may close these issues.

앱 반응속도 개선
2 participants