Skip to content

#272 MetaData Read를 Paging을 통해 최적화#273

Open
LDEV4966 wants to merge 7 commits intodevfrom
DSM-272
Open

#272 MetaData Read를 Paging을 통해 최적화#273
LDEV4966 wants to merge 7 commits intodevfrom
DSM-272

Conversation

@LDEV4966
Copy link
Collaborator

issue : #272

기능 추가 :

CustomizedMetaDataRepository 내 findByProjectIdWithPagingAndFiltering API를 추가하여, 파라미터 값으로 받은 page, size, projectId 를 통해 해당 프로젝트 아이디를 가진 메타데이터 중 page 값에 해당 하는 메타데이터들을 size 만큼 받아 온다.

MeataData QA로 실제 DB로 접근하여 테스팅시,

  • 기존 방식으로 10만개 기준 2sec 380ms가 소요되지만 size를 20으로 규정 후 paging 기법으로 찾으니, 330ms만에 해당 페이징 내에 있는 메타데이터 리스트를 찾아올 수 있었다.

추가 방향 :

  1. 필터링 값들을 동적으로 적용할 수 있도록 수정한다.
  2. 개선율을 100만개 단위로 계산해 보고, 성능향상을 기록한다.

…tering 쿼리를 추가

issue : #272

기능 추가 :

CustomizedMetaDataRepository 내 findByProjectIdWithPagingAndFiltering API를 추가하여, 파라미터 값으로 받은 page, size, projectId 를 통해 해당 프로젝트 아이디를 가진 메타데이터 중 page 값에 해당 하는 메타데이터들을 size 만큼 받아 온다.

MeataData QA로 실제 DB로 접근하여 테스팅시,

* 기존 방식으로 10만개 기준 2sec 380ms가 소요되지만 size를 20으로 규정 후 paging 기법으로 찾으니, 330ms만에 해당 페이징 내에 있는 메타데이터 리스트를 찾아올 수 있었다.

추가 방향 :

1. 필터링 값들을 동적으로 적용할 수 있도록 수정한다.
2. 개선율을 100만개 단위로 계산해 보고, 성능향상을 기록한다.
@LDEV4966 LDEV4966 requested a review from BEOKS May 13, 2022 17:28
@LDEV4966 LDEV4966 self-assigned this May 13, 2022
@LDEV4966 LDEV4966 added BackEnd Refactor Code refactoring labels May 13, 2022
LDEV4966 and others added 3 commits May 16, 2022 01:41
issue : #273

Controller 영역에서 Request Parm 통한 page&size 동적으로 처리 가능하도록 수정
머신러닝 API 테스트 코드의 경우 빈 생성에 필요한
내부 클래스 인스턴스인 AsyncMetaDataSampler가
빈으로 생성되어 있지 않아 이를 주입하였다.
@github-actions
Copy link

github-actions bot commented May 18, 2022

Unit Test Results

  8 files    8 suites   1s ⏱️
44 tests 44 ✔️ 0 💤 0

Results for commit 4c72ccf.

♻️ This comment has been updated with latest results.

issue : #272

오류 수정 내역 :

1.  현재 기존에 만들었던 함수 findByProjectIdWithPagingAndFiltering에서 현재 필터링 기능이 없어 네이밍을  findByProjectIdWithPaging으로 수정하였음

2. 기존의 @GetMapping("api/MetaData/{projectId}")으로 진행했던 testcode에서 findByProjectId 기능을 findByProjectIdWithPaging 기능으로 수정하여 진행하였음 (컨트롤러&서비스 단). => projectId와 페이징 정보를 기반으로 메타데이터 리스트를 반환한다.
@LDEV4966 LDEV4966 changed the title Feat : MetaData Read를 Paging을 통해 최적화 #272 MetaData Read를 Paging을 통해 최적화 May 19, 2022
issue : #273

문제해결 점 : 기존에 제거한 findByProjectId 기능을 원상복구 하고, uri 중복을 피하기 위해 pagination기능의 uri를 api/MetaData/{projectId}/pagination로 수정
BEOKS pushed a commit that referenced this pull request May 28, 2022
issue : #273

Controller 영역에서 Request Parm 통한 page&size 동적으로 처리 가능하도록 수정
페이지 요청 정보를 레퍼 클래스로 만들고
메타데이터 리스트를 업로드 할 때, 함수 분할과
람다를 이용하여 가독성 향상
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

BackEnd Refactor Code refactoring

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants