-
Notifications
You must be signed in to change notification settings - Fork 23.5k
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
[IMP] web, onboarding: avoid unneccessary rpc request #143212
[IMP] web, onboarding: avoid unneccessary rpc request #143212
Conversation
bd7fd74
to
c6fdd5f
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.
Thanks for the changes @fdardenne ;
I wonder if we shouldn't also have a time limit to this cache to keep the perf improvement but also allow more frequent refreshes as other admins could interact with the steps as well and we would "never" see it.
Maybe a few hours?
b1202a0
to
fcafded
Compare
my 2cents here: whilst you're technically correct that this could lead to desynchronization, i don't think this is worth the hassle for the following reasons:
As long as it's ultimately consistent, i think it's fine. no need to make the solution more complex for this. |
f9aa270
to
95e4304
Compare
95e4304
to
04f59dd
Compare
39c7e76
to
2f6bb6e
Compare
The OnboardingBanner is a component that allows having banner in views. For example you can find banners in Accounting->Invoices, Calendar, ... To do that, the OnboardingBanner component fetch from the server the html to display in the banner. However we would like to avoid the following unnecessary requests: - When the banner is closed - When the user do not have the right to display the banner (not in the `base.group_system group`) This commit avoid thoses unnecessary requests for the `/onboarding/*` routes by storing the displayable banner in the session_info. This optimization is made to the generic `/onboarding` route because this route is linked to the `onboarding.onboarding` model and each record specify if the steps are done and if the banner is manually closed. Additionally, we know that this route is only accessible for user with `base.group_system` group. task-id: 3561730
2f6bb6e
to
dd4fff8
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.
robodoo r+
The OnboardingBanner is a component that allows having banner in views. For example you can find banners in Accounting->Invoices, Calendar, ... To do that, the OnboardingBanner component fetch from the server the html to display in the banner. However we would like to avoid the following unnecessary requests: - When the banner is closed - When the user do not have the right to display the banner (not in the `base.group_system group`) This commit avoid thoses unnecessary requests for the `/onboarding/*` routes by storing the displayable banner in the session_info. This optimization is made to the generic `/onboarding` route because this route is linked to the `onboarding.onboarding` model and each record specify if the steps are done and if the banner is manually closed. Additionally, we know that this route is only accessible for user with `base.group_system` group. closes #143212 Task-id: 3561730 Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
The OnboardingBanner is a component that allows having banner in
views. For example you can find banners in Accounting->Invoices,
Calendar, ...
[IMP] onboarding: use session_info to avoid unnecessary requests
The OnboardingBanner component fetch from the server the html
to display in the banner.
However we would like to avoid the following unnecessary requests:
base.group_system
group)This commit avoid thoses unnecessary requests for the
/onboarding/*
routes by storing the displayable banner in the session_info.
This optimization is made to the generic
/onboarding
route becausethis route is linked to the
onboarding.onboarding
model and eachrecord specify if the steps are done and if the banner is manually
closed. Additionally, we know that this route is only accessible for
user with
base.group_system
group.On a side note, in #141110 we tried to make OnboardingBanner rpc fetching asynchronous. Allowing views to render without the need of waiting the rpc response of the banner.
Unfortunately it caused a flickering, i.e. the banner was rendered after the view leading to the repositioning of user interface elements. For the moment it is not possible to show a skeleton to avoid such flickering because the client does not know the height of the banner without the rpc answer.
task-id: 3561730