-
Notifications
You must be signed in to change notification settings - Fork 5
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
Concurrent 방식의 QuadTree 생성 #59
Conversation
- 화면별 트리 분할 관리 - 쿼드트리 병렬 생성 및 실행
- clustering service 생성시 poi service를 inject 해준다.
- clustering service 생성시 poi service를 inject 해준다.
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.
한반도 전체를 쿼드 트리로 만들었군요. 👍
트리 구축하는 게 너무 느리면, 줌 레벨 별로 그리드 인덱스를 구축하는 것도 대안이 될 수 있겠어요.
줌 레벨이 하나 증가할 때 마다 타일이 네 개로 쪼개지는 개념은 같으니깐요.
그러기엔 너무 많이 진행되어 버렸나..;
@beggu84 생성이 느린 부분은 위에 filter말고 다른 방식도 생각을 했는데, 사실 아직 구현이 될지 몰라 확인 후 추가하도록 하겠습니다! |
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.
LGTM
이해를 돕기 위해 지구의 가로 길이만 생각해 봤을 때. 쿼드 트리랑 비슷하지 않나요? |
그리드 인덱스는, 그냥 한 번 고려해 보시라 하는 거니, 부담 갖지 마세요. 이미 쿼드 트리로 많이 진행하셨으니깐요. |
@beggu84 |
구현내용
Concurrent 방식의 QuadTree 생성
(한반도 전체 기준 영역(Bounding Box) 분할)
[이미지 1]
![스크린샷 2020-12-05 오후 4 50 57](https://user-images.githubusercontent.com/57888770/101237190-1a9b6100-371a-11eb-8430-eea88bf8b402.png)
한반도 전역 약 370만개 데이터를 25개의 트리로 관리했을때, CPU 사용량
[이미지 2]
한반도 전역 약 370만개 데이터를 25개의 트리로 관리했을때, 실행 화면
논의사항
QuadTree의 장점
QuadTree의 단점
단점을 보완하기위해 여러개의 트리를 동시에 병렬로 생성을 하면 시간이 단축될 수 있지않을까 생각을 함.
초기 실행이 느려지는 일이 발생하는데, Coredata로부터 Fetch를 분할된 화면만큼 실행해서 느려지는 것으로 생각됨