-
Notifications
You must be signed in to change notification settings - Fork 31
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
Performance: Optimized data loading of course #416
base: develop
Are you sure you want to change the base?
Performance: Optimized data loading of course #416
Conversation
Sh-AhsanArif
commented
Jan 16, 2025
- Optimized data loading on app dashboard screen (cached data first)
- Optimized data loading on course outline screen (cached data first)
- Minor code refactoring
Thanks for the pull request, @Sh-AhsanArif! This repository is currently maintained by @openedx/openedx-mobile-maintainers. Once you've gone through the following steps feel free to tag them in a comment and let them know that your changes are ready for engineering review.
|
@Sh-AhsanArif as you are covered by the Arbisoft entity CLA, I've added you to the triage team. This will allow tests to run automatically on your PRs. Please accept the invite. |
course/src/main/java/org/openedx/course/data/repository/CourseRepository.kt
Fixed
Show fixed
Hide fixed
course/src/main/java/org/openedx/course/data/repository/CourseRepository.kt
Fixed
Show fixed
Hide fixed
course/src/main/java/org/openedx/course/presentation/container/CourseContainerViewModel.kt
Fixed
Show fixed
Hide fixed
course/src/main/java/org/openedx/course/presentation/container/CourseContainerViewModel.kt
Fixed
Show fixed
Hide fixed
course/src/main/java/org/openedx/course/presentation/container/CourseContainerViewModel.kt
Fixed
Show fixed
Hide fixed
cd9e651
to
e816e86
Compare
course/src/main/java/org/openedx/course/presentation/container/CourseContainerViewModel.kt
Fixed
Show fixed
Hide fixed
e816e86
to
e86d49f
Compare
course/src/test/java/org/openedx/course/presentation/outline/CourseOutlineViewModelTest.kt
Fixed
Show fixed
Hide fixed
course/src/test/java/org/openedx/course/presentation/outline/CourseOutlineViewModelTest.kt
Fixed
Show fixed
Hide fixed
d2c5156
to
44803f0
Compare
@Sh-AhsanArif |
Thank you for your feedback! That’s a great suggestion, and I completely agree that moving all relevant methods to return Let me know what you think! |
@Sh-AhsanArif |
44803f0
to
d28d821
Compare
Hi, @Sh-AhsanArif I’ve reviewed the app again and have a few questions:
Could you clarify why we are using
|
Hey @Sh-AhsanArif, thank you so much for this improvement! I had a chance to take a quick look, and I noticed a couple of small UI issues in your repo, as shown in the video:
OpenEdxPR.webm |
course/src/main/java/org/openedx/course/data/repository/CourseRepository.kt
Fixed
Show fixed
Hide fixed
course/src/main/java/org/openedx/course/data/repository/CourseRepository.kt
Fixed
Show fixed
Hide fixed
course/src/main/java/org/openedx/course/presentation/outline/CourseOutlineViewModel.kt
Fixed
Show fixed
Hide fixed
course/src/main/java/org/openedx/course/presentation/outline/CourseOutlineViewModel.kt
Fixed
Show fixed
Hide fixed
Hey @PavloNetrebchuk, @omerhabib26 Thank you for reviewing the PR and providing valuable feedback. I’ve incorporated the suggested changes and fixed the mentioned issues. Please have a look at the latest updates and let me know if any further adjustments are needed. |
course/src/main/java/org/openedx/course/presentation/outline/CourseOutlineViewModel.kt
Outdated
Show resolved
Hide resolved
course/src/main/java/org/openedx/course/presentation/container/CourseContainerViewModel.kt
Outdated
Show resolved
Hide resolved
@Sh-AhsanArif Hello. It looks good to me. Just 2 question ⬆️ |
course/src/test/java/org/openedx/course/presentation/container/CourseContainerViewModelTest.kt
Fixed
Show fixed
Hide fixed
course/src/test/java/org/openedx/course/presentation/outline/CourseOutlineViewModelTest.kt
Fixed
Show fixed
Hide fixed
f9b8ad1
to
aaee6ff
Compare
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.
Approve
Thank you @Sh-AhsanArif for the update. I'll start its review on monday. |
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.
only a minor nit
"INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, 'bcac519e74e751a75f3e6fa5d39ac5a3')" | ||
] | ||
} | ||
} |
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.
Please add a line at EOF.
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.
Hi @omerhabib26.
Thank you for reviewing the PR. The Schema files are auto-generated by Room, so it's best not to edit them manually to ensure schema consistency and avoid auto migration issues. Let me know your thoughts on this!
"INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, 'ed545aec6739ec7692c4bb72179331c4')" | ||
] | ||
} | ||
} |
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.
same here