We updated the OOD version from 3.1.10 to 4.0.0.
It’s just a feeling, but it feels like it’s become slower.
I looked at /var/log/ondemand-nginx/<my_account>/error.log.
Every time I click on an application icon, the following message is being output every second.
I also notice a difference in performance after updating from OOD 3.1.11 to 4.0. The time required for the Dashboard to fully load in OOD 4.0 is approximately 3300ms, whereas in OOD 3.1.11, it was only 1200ms—so about twice as slow in the newer version.
I installed OOD v4.0.2, but the slowdown did not change. So I investigated the difference in behavior with v3.1.10. In our environment, there are about 50 applications and 50 png small image files for icon. OOD v4 takes a long time to load the icons.
As mentioned in the first post, the duration= value is about 800 in OOD v4, but it is about 350 in OOD v3. Furthermore, when opening a web form page for entering time etc., the 50 lines INFO "method=GET path=/ in error.log in the first post are displayed, but in OOD v3 only one line is displayed.
To enable caching, I added a line expires_in 1.day, public: true in the icon method in /var/www/ood/apps/sys/dashboard/app/controllers/apps_controller.rb in OOD v4, and only one line was displayed just like in OOD v3, and the speed improved. However, the duration value remains large.
Are you doing lots of embedded ruby in the various applications? It’s possible you are doing a ton under the hood when you load the apps that would be better done as initializers.
Are you doing lots of embedded ruby in the various applications?
Yes.
It’s possible you are doing a ton under the hood when you load the apps that would be better done as initializers.
I agree with you.
I believe Open OnDemand evaluates the form.yml.erb for all applications when opening a dashboard or opening an application page. But I understand the intent of that behavior; it would be nice if we could separate the initialization process from the rest in Ruby in the form.yml.erb, but I don’t know how to do that.
You want to use global initializers that only run when the dashboard is initially loaded and then use those variables down stream in your apps. For instance, if you want to figure out what groups a user is in, instead of having embedded ruby in each app do something like getent group which then runs a bunch of times for each app its in, you put that in an initializer which stores the result in a variable and then you just reference the variable in your various apps.
Yea apologies for any issues in 4.1. We’re looking into caching those rendered erbs.
Along with an initializer, if you know them straight out, you can use global batch connect form items in 4.1 if you have a lot of things you reuse. These are evaluated once on load through an ondemand.d file and all the forms just reference them.