Skip to content

⚡ Bolt: R/aFIPC.R 내부의 fscores 중복 호출 성능 최적화#75

Open
seonghobae wants to merge 1 commit into
masterfrom
bolt-optimize-fscores-11281994062846802815
Open

⚡ Bolt: R/aFIPC.R 내부의 fscores 중복 호출 성능 최적화#75
seonghobae wants to merge 1 commit into
masterfrom
bolt-optimize-fscores-11281994062846802815

Conversation

@seonghobae

Copy link
Copy Markdown
Collaborator

💡 What:
R/aFIPC.RautoFIPC 함수 내에서 반복해서 수행되던 고비용 연산인 mirt::fscores()를 캐싱하여 재사용하도록 코드를 수정했습니다.
.jules/bolt.md를 생성하여 퍼포먼스 향상에 관한 핵심적인 깨달음을 기록했습니다.
R CMD build/check 시 .jules 폴더로 인한 경고가 발생하지 않도록 .Rbuildignore를 수정했습니다.
tests/testthat/test-autoFIPC.R를 통해 정상 실행 여부를 확인하는 테스트를 추가했습니다.

🎯 Why:
mirt::fscores(..., method = 'MAP')는 굉장히 무거운 연산입니다. 기존 코드는 ExpectedScore를 계산할 때 한 번, 그리고 Theta 변수를 할당할 때 또 한 번 동일한 함수를 호출하는 구조적 비효율성이 있었습니다.

📊 Impact:
fscores() 함수 호출 횟수가 절반(6회 -> 3회)으로 줄어들어, 규모가 큰 데이터셋일수록 링크 모델을 계산하는 속도가 눈에 띄게 빨라집니다. 모델 하나당 1회의 맵핑 비용이 절감됩니다.

🔬 Measurement:
R CMD check --no-manual이 경고 없이 통과하며, testthat 테스트가 성공적으로 동작함을 확인했습니다.


PR created automatically by Jules for task 11281994062846802815 started by @seonghobae

`R/aFIPC.R` 내에서 `mirt::fscores(..., method = 'MAP')` 가 불필요하게 두 번씩 호출되고 있던 병목 현상을 해결했습니다. `ThetaOldform`, `ThetaLinkedform`, `ThetaNewform` 변수에 먼저 계산 결과를 저장(캐싱)한 뒤 `mirt::expected.test(...)` 에 전달하여 성능을 크게 향상시켰습니다. 또한 최적화에 대한 배움을 `.jules/bolt.md` 에 기록하였고, 패키지 빌드 경고를 막기 위해 `.Rbuildignore` 에 해당 폴더를 추가했습니다.
@google-labs-jules

Copy link
Copy Markdown

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant