-
Notifications
You must be signed in to change notification settings - Fork 8k
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
Add change event #12399
Add change event #12399
Conversation
Preview URLs Flaws (7)URL:
External URLs (2)URL:
(comment last updated: 2023-03-28 10:30:51) |
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.
slug: Web/API/HTMLElement/change_event | ||
original_slug: Web/API/GlobalEventHandlers/onchange | ||
l10n: | ||
sourceCommit: 4a4dc12d552b6da5fc320369001434cdb46f9f59 |
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.
sourceCommit: 4a4dc12d552b6da5fc320369001434cdb46f9f59 | |
sourceCommit: 0230ecc4418a1e52bca6b4d03c4eb794f90d04f1 |
페이지 갱신 표시 안내서에 따라 content repo의 동일한 파일(페이지)의 가장 최신 hash 값을 명시해야합니다.
안내서가 조금 모호한 부분이 있네요! 수정하겠습니다.
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.
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.
그런데 sourceCommit
이 원본 마지막 커밋보다 앞서나가는 경우에는 괜찮지 않을까요..? 4a4dc12d552b6da5fc320369001434cdb46f9f59
로 조회하나 0230ecc4418a1e52bca6b4d03c4eb794f90d04f1
로 조회하나 2월 28일인 건 같으니까요
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.
우선, https://github.com/orgs/mdn/discussions/129 에서 현재 방식으로 결정되어서 다른 locale은 파일 기준으로 기록하고 있습니다.
위 이미지의 Source Commit 부분을 현재 mdn/yari#8338 에서 개발하고 있습니다.
그런데 sourceCommit이 원본 마지막 커밋보다 앞서나가는 경우에는 괜찮지 않을까요..?
현재 고민중인 부분인데요. 답변을 드리기 위해 조금 자세히 설명을 드리겠습니다.
구현 방법에 따라서 괜찮고 안괜찮고가 달라져서 우선은 안전하게 변경 요청 드렸습니다. (회사 업무가 많아서.. 문제 해결에 시간이 조금 걸릴것같습니다.)
고민 사항은 아래와 같습니다.
(1) git rev-list --count ${commitHash}..HEAD -- ${filename}
을 통해 해당 파일에서 차이나는 commit 개수를 구할 수 있습니다. 이때 파일의 history에 포함된 hash만 유효합니다.
- 장점
- 확실하고 안전하게 결과 값을 도출 할 수 있습니다.
- 단점
- 시간이 오래 걸립니다. (2000개 파일, 약 3분 20초)
(2) git log --pretty=format:'%H' --name-only ${commitHash}..${memCommitStoreOldest}
에서 git hash 변경에 포함된 파일 목록을 불러오고, 최근 hash에서 기록된 memCommitStoreOldest까지 순회하며 해당되는 파일 이름과 일치하면 count를 증가시켜 차이나는 commit 개수를 구하는 방식입니다.
- 장점
- 빠릅니다. (2000개 파일, 약 22초)
- 단점
- git log 출력 값을 자료구조 Map에 확장해나가며 저장하고 있는데, commit이 많이 뒤쳐지게 된다면 메모리가 터질 위험이 있습니다. 현재 content repo의 커밋 개수는 17000개이고, 커밋이 증가되는 속도를 보면 충분히 고려되어야합니다. 이때, 확장을 멈출 기준을 정하는데 어려움을 겪고있습니다. (content repo에 대해 hash가 100개 뒤쳐져 있다고 해도 실제 해당 파일에서는 hash가 2개만 뒤쳐져있을 수 있습니다.)
따라서 링크드린 PR이 병합되기전까지는 우선 현재와같이 안내드리려고합니다 ㅜㅜ
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.
확인했습니다~
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.
바로 머지하면 comment 알림이 안갈 수 있어서 확인 답변 주시면 머지하겠습니다!
Description
change
이벤트를 추가합니다.Motivation
Additional details
Related issues and pull requests