-
Notifications
You must be signed in to change notification settings - Fork 69
fix: metabase #1118
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
fix: metabase #1118
Conversation
|
Oops! Looks like you forgot to update the changelog. When updating CHANGELOG.md, please consider the following:
|
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.
Greptile Overview
Important Files Changed
File Analysis
| Filename | Score | Overview |
|---|---|---|
| src/analytics/analytics.ts | 1/5 | Added country place of birth resolution with critical performance issue: CSV file read in loop for every action |
2 files reviewed, 1 comment
src/analytics/analytics.ts
Outdated
| const messages = await readCSVToJSON<{ id: string; en: string }[]>( | ||
| 'src/translations/client.csv' | ||
| ) |
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.
logic: CSV file read on every function call inside a loop causes severe performance degradation. This function is called for each action in upsertAnalyticsEventActions (line 238), meaning the CSV file is read repeatedly. Cache the translation data outside the function or pass it as a parameter.
Note
Currently, we do not run e2e tests as a check on
opencrvs-countryconfig-repo PRs. Please ensure your PR doesn't break any e2e tests.One method for doing this is to open a PR with these changes to
opencrvs-farajalandas well, and see if the PR check passes there.Description
Clearly describe what has been changed. Include relevant context or background.
Explain how the issue was fixed (if applicable) and the root cause.
Link this pull request to the GitHub issue (and optionally name the branch
ocrvs-<issue #>)Checklist