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

Load industries lists as static data #301

Merged
merged 8 commits into from
Jul 2, 2020
Merged

Load industries lists as static data #301

merged 8 commits into from
Jul 2, 2020

Conversation

yawboakye
Copy link
Member

@yawboakye yawboakye commented Jul 1, 2020

Our list of industries don't change (they haven't changed in 2 years). But they're stored in a database table. Which means we incur network cost every time we render the register company page. This PR changes that. The data is now stored as YAML and loaded exactly once when the application starts. The loaded data is used for the entire duration of the app. It's a small memory cost, but definitely better than network + GC cost of the current implementation.

@yawboakye yawboakye added the enhancement New feature or request label Jul 1, 2020
# do, as such we can hold them in memory for the entire duration the application
# is up. Saves us both network and garbage collection cost, at a small price.
#
# Proof available on request.
Copy link
Member

Choose a reason for hiding this comment

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

@yawboakye I'd like to request proof, for reference purposes. Will be a good reference point for similar decisions going forward.

Good changes, overall.

claudey
claudey approved these changes Jul 2, 2020
@claudey claudey merged commit ecafa1d into develop Jul 2, 2020
@claudey claudey deleted the industry-array branch July 2, 2020 06:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants