Skip to content
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) Use size 100 for the references chunk size to append to the url. #335

Merged
merged 1 commit into from
Jul 1, 2024

Conversation

hadijahkyampeire
Copy link
Contributor

@hadijahkyampeire hadijahkyampeire commented Jul 1, 2024

Requirements

  • This PR has a title that briefly describes the work done including the ticket number. If there is a ticket, make sure your PR title includes a conventional commit label. See existing PR titles for inspiration.
  • My work conforms to the OpenMRS 3.0 Styleguide and design documentation.
  • My work includes tests or is validated by existing tests.

Summary

  • Use chunks of 100 for the concept references so as to avoid the URI exceeding the limit.
    NB: The system default chunkSize works as data limit but in this case it was failing because it was being used to determine the number of concept uuids to be added to the url and this is what caused the limit bug.

So in this case, we don't need the system default chunk size (1000) because that would me 1000 concept uuids added to the endpoint as query params.
In this PR, I used a random value 100 which is efficient in performance of the request time and a good chunk to fetch in cases where we have a lot of data.

Screenshots

Screenshot 2024-07-01 at 15 05 49

Screenshot 2024-07-01 at 15 05 04

Related Issue

  • No ticket

Other

Copy link

github-actions bot commented Jul 1, 2024

Size Change: -245 kB (-19.51%) 🎉

Total Size: 1.01 MB

Filename Size Change
dist/800.js 0 B -245 kB (removed) 🏆
ℹ️ View Unchanged
Filename Size Change
dist/184.js 11.2 kB 0 B
dist/195.js 76.6 kB 0 B
dist/225.js 2.57 kB 0 B
dist/29.js 163 kB 0 B
dist/300.js 709 B 0 B
dist/327.js 1.84 kB 0 B
dist/335.js 967 B 0 B
dist/353.js 3.02 kB 0 B
dist/41.js 3.36 kB 0 B
dist/422.js 6.79 kB 0 B
dist/474.js 116 kB -2 B (0%)
dist/491.js 9.18 kB 0 B
dist/540.js 2.63 kB 0 B
dist/55.js 756 B 0 B
dist/635.js 14.3 kB 0 B
dist/70.js 482 B 0 B
dist/708.js 245 kB 0 B
dist/776.js 3.2 kB 0 B
dist/99.js 690 B 0 B
dist/993.js 3.09 kB 0 B
dist/main.js 343 kB -1 B (0%)
dist/openmrs-form-engine-lib.js 3.72 kB 0 B

compressed-size-action

Copy link
Contributor

@arodidev arodidev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@arodidev arodidev merged commit 1620df6 into main Jul 1, 2024
4 checks passed
@arodidev arodidev deleted the hk-fix-concept-references-url-limit branch July 1, 2024 12:17
Art-Ndiema pushed a commit to Art-Ndiema/openmrs-form-engine-lib that referenced this pull request Aug 8, 2024
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.

2 participants