-
Notifications
You must be signed in to change notification settings - Fork 8
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
perf/PSD-3232-SCPN-product_controler_refactoring #3498
Merged
mirotriad
merged 1 commit into
main
from
perf/PSD-3232-SCPN-product_controler_refactoring
Jan 6, 2025
Merged
perf/PSD-3232-SCPN-product_controler_refactoring #3498
mirotriad
merged 1 commit into
main
from
perf/PSD-3232-SCPN-product_controler_refactoring
Jan 6, 2025
Conversation
This file contains 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
meeravnagesh
requested changes
Dec 17, 2024
cosmetics-web/app/controllers/responsible_persons/notifications/product_controller.rb
Outdated
Show resolved
Hide resolved
cosmetics-web/app/controllers/responsible_persons/notifications/product_controller.rb
Outdated
Show resolved
Hide resolved
tahir-khalid
approved these changes
Dec 18, 2024
cosmetics-web/app/controllers/responsible_persons/notifications/product_controller.rb
Outdated
Show resolved
Hide resolved
cosmetics-web/app/controllers/responsible_persons/notifications/product_controller.rb
Outdated
Show resolved
Hide resolved
cosmetics-web/app/controllers/responsible_persons/notifications/product_controller.rb
Show resolved
Hide resolved
cosmetics-web/app/controllers/responsible_persons/notifications/product_controller.rb
Show resolved
Hide resolved
cosmetics-web/app/controllers/responsible_persons/notifications/product_controller.rb
Show resolved
Hide resolved
cosmetics-web/spec/controllers/responsible_persons/notifications/product_controller_spec.rb
Show resolved
Hide resolved
alan-at-work
force-pushed
the
perf/PSD-3232-SCPN-product_controler_refactoring
branch
from
December 31, 2024 09:22
6c60457
to
d1d3d58
Compare
meeravnagesh
force-pushed
the
perf/PSD-3232-SCPN-product_controler_refactoring
branch
from
January 6, 2025 12:05
6f3aee9
to
12dfbf9
Compare
meeravnagesh
reviewed
Jan 6, 2025
cosmetics-web/app/controllers/responsible_persons/notifications/product_controller.rb
Show resolved
Hide resolved
…ductController and add tests
mirotriad
force-pushed
the
perf/PSD-3232-SCPN-product_controler_refactoring
branch
from
January 6, 2025 14:15
ca3e742
to
405a9c5
Compare
meeravnagesh
approved these changes
Jan 6, 2025
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.
Optimize Performance of Product Controller's Show and Update Methods
Summary
This PR improves the performance of the
ResponsiblePersons::Notifications::ProductController
by optimizing database queries in bothshow
andupdate
methods. The changes reduce unnecessary database loads and minimize query count while maintaining existing functionality.Key Changes
Show Method Optimization
Update Method Optimization
update_column
for simple attribute changes:product_name
updatesunder_three_years
updatesset_notification_and_authorize
:nano_materials
andcomponents
for steps that need themcomponents
for thesingle_or_multi_component
stepCode Organization
Performance Improvements
Testing
Notes