Conversation
Contributor
There was a problem hiding this comment.
Code Review
This pull request introduces a caching mechanism for CargoClassMetadata using a Map and a helper function to optimize performance by avoiding redundant object creation during the binding process. The review feedback suggests further improving this by moving the initialization logic for the metadata state into the cache retrieval function and removing the now-redundant calls from the main binding logic.
Contributor
|
확인했습니다! 캐싱되는 데이터가 코드에 고정된 클래스 구조라서 캐시에 대한 다른 추가 정책이 없어도 괜찮은거군요?? |
dami0806
approved these changes
Apr 16, 2026
laggu
reviewed
Apr 17, 2026
| let meta = metaCache.get(classConstructor) | ||
| if (!meta) { | ||
| meta = new CargoClassMetadata(classConstructor.prototype) | ||
| meta.markBindingCargoCalled() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
현재
bindingCargo함수 내에서 사용자가 입력한 class 객체를 평가하기 위해 매 요청마다 객체를 새롭게 생성해서 사용하고 있어 이를 해결하기 위한 작업을 수행하였습니다.처음에는 클로저 방식으로 최상위 클래스의 메타데이터만 사전 분석하였으나, 중첩 구조에서는 여전히 매 요청마다 메타데이터를 재생성하는 문제가 있어 모듈 레벨 캐시를 도입하여 모든 클래스의 메타데이터를 일관되게 캐싱하도록 변경하였습니다.