-
-
Notifications
You must be signed in to change notification settings - Fork 729
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
Speed up super admin dashboard #13147
base: master
Are you sure you want to change the base?
Conversation
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.
Nice! I really like that solution of limiting the output without adding a special case for admins. Well done.
@@ -182,6 +182,7 @@ end | |||
group :development do | |||
gem 'debugger-linecache' | |||
gem 'foreman' | |||
gem 'i18n-tasks' |
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.
@filipefurtad0 used this gem before, but without adding it to the Gemfile. Since the configuration is quite important as well and adding this gem keeps coming up it's good that you are doing this properly now.
I doubted the use of this gem before:
So the trade-off is the maintenance and use of this gem vs the benefit. I didn't know that it has that many configuration options. So if we can easily define the patterns of our dynamic keys then this may be worth it.
It would be cool to include automated tests. The tests could detect issues and recommend actions like this:
- Missing translation found: If this didn't fail a spec then please add spec coverage before adding the translation.
- Unused translation found: Did you forget to remove this translation?
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, yeah I remembered that PR and thought it was worth considering again.
I like your thinking about how we can automate it.
In the meantime, we can start using it ad-hoc and build up our config as we go.
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.
Nice clean up 🧹 !
Hi @dacook, |
Div is the default element in HAML, so we don't need to specify it. https://haml.info/docs/yardoc/file.REFERENCE.html#implicit-div-elements
Div is the default element in HAML, so we don't need to specify it.
I thought about reducing it further, but maybe people are used to having a large list. Let's see how this performs
I searched the codebase for these keys, but couldn't find them The next ones look unused too. I thought we had a plugin to help with that..
And check fo unused translations: bundle exec i18n-tasks unused -l en -f key-values | wc -l 1277 Wow, really??
That brings the count down to 'only' 1057. There's probably a lot of other keys that are dynamically generated, I did *not* review them all. We could consider saving the output of this command to a todo file.
Thanks Konrad, I've fixed the conflict. |
Hi @dacook, Average loading times (10 runs):
Regarding AU: Here the test requests from Postman are automatically redirected to the Here is a screenshot of the new and shorter list of enterprises: As you can see, there are 25 of more than 4000 enterprises listed. ✔️ Did I miss anything? I will move this back to In Progress for you to have a look. |
Thanks for the feedback Konrad! I wasn't sure if we could communicate it better.
Ultimately, it's only power users who would have more than 25 enterprises, so they can probably work it out themselves ;) What do you think? |
AU StagingI just tried it and it works fine for me. I just looked, and found there is logic to redirect to enterprises screen if it's your "first access" of the admin interface. If:
So maybe you just need to go to the homepage first and click on Administration in the menu. Or you might need to set up a new enterprise. |
Thanks David, I understand your point but I'm still hesitant. Some people use Ctrl + F to find a certain enterprise in the very long list of enterprises. This won't work anymore without the possibility to load the full list. It also doesn't work anymore on the enterprises list page, because we've introduced pagination there as well. I think we should ask @RachL and @tschumilas for their opinions on this. I could imagine that adding the link is not a lot of work? |
What? Why?
It takes so long to load because there's so many enterprises. We don't need to see those.
This has been bugging me since.. forever.
Also did some code cleanup, and removed some unused translation keys.
I tried to use gem i18n-tasks to discover unused keys, but it seemed too risky to clean up too many at once.
If code review passes, maybe it's worth running this past an instance manager too.
What should we test?
go make a coffeeIt loads quickly!Release notes
Changelog Category (reviewers may add a label for the release notes):
The title of the pull request will be included in the release notes.
Dependencies
Documentation updates