# Open OnDemand 4.0 seems slow

**URL:** <https://discourse.openondemand.org/t/open-ondemand-4-0-seems-slow/3972>\
**Category:** Get Help\
**Tags:** question\
**Created:** [January 20, 2025, 5:44am UTC](https://discourse.openondemand.org/t/open-ondemand-4-0-seems-slow/3972 "2025-01-20T05:44:59Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![mnakao](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/mnakao/32/1001_2.png) [@mnakao](https://discourse.openondemand.org/u/mnakao)\
**Post date:** [January 20, 2025, 5:44am UTC](https://discourse.openondemand.org/t/open-ondemand-4-0-seems-slow/3972/1 "2025-01-20T05:44:59Z")

</div>

Dear developers,

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.

```auto
App 788877 output: [2025-01-20 14:33:47 +0900] WARN "Announcement file not found: /etc/ood/config/announcement.md"
App 788877 output: [2025-01-20 14:33:47 +0900] WARN "Announcement file not found: /etc/ood/config/announcement.yml"
App 788877 output: [2025-01-20 14:33:47 +0900] INFO "method=GET path=/pun/sys/dashboard/apps/icon/VisIt/sys/sys format=html controller=AppsController action=icon status=200 allocations=580057 duration=803.33 view=0.00"
App 788877 output: [2025-01-20 14:33:48 +0900] WARN "Announcement file not found: /etc/ood/config/announcement.md"
App 788877 output: [2025-01-20 14:33:48 +0900] WARN "Announcement file not found: /etc/ood/config/announcement.yml"
App 788877 output: [2025-01-20 14:33:48 +0900] INFO "method=GET path=/pun/sys/dashboard/apps/icon/XCrySDen/sys/sys format=html controller=AppsController action=icon status=200 allocations=579877 duration=811.34 view=0.00"
App 788877 output: [2025-01-20 14:33:49 +0900] WARN "Announcement file not found: /etc/ood/config/announcement.md"
App 788877 output: [2025-01-20 14:33:49 +0900] WARN "Announcement file not found: /etc/ood/config/announcement.yml"
App 788877 output: [2025-01-20 14:33:49 +0900] INFO "method=GET path=/pun/sys/dashboard/apps/icon/WHEEL/sys/sys format=html controller=AppsController action=icon status=200 allocations=579975 duration=801.40 view=0.00"

```

Since we have about 50 applications installed in our Open OnDemand site, this message lasts for 50 seconds.

OOD v3.1.10 did not output such a message, so could this message be the reason for the slowness?

Best,

---

<div class="post-metadata">

**Author:** ![jeff.ohrstrom](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/jeff.ohrstrom/32/136_2.png) [@jeff.ohrstrom](https://discourse.openondemand.org/u/jeff.ohrstrom)\
**Post date:** [January 22, 2025, 4:16pm UTC](https://discourse.openondemand.org/t/open-ondemand-4-0-seems-slow/3972/2 "2025-01-22T16:16:28Z")

</div>

Hey sorry for the delay in the response. I don’t think those log messages should cause noticeable delay, but I’ll look into why they’re there at all.

---

<div class="post-metadata">

**Author:** ![Dzung.Nguyen](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/dzung.nguyen/32/2590_2.png) [@Dzung.Nguyen](https://discourse.openondemand.org/u/Dzung.Nguyen)\
**Post date:** [February 27, 2025, 2:57pm UTC](https://discourse.openondemand.org/t/open-ondemand-4-0-seems-slow/3972/3 "2025-02-27T14:57:55Z")

</div>

Dear Jeff,

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.

With kind regards,  
Dzung

---

<div class="post-metadata">

**Author:** ![mnakao](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/mnakao/32/1001_2.png) [@mnakao](https://discourse.openondemand.org/u/mnakao)\
**Post date:** [April 9, 2025, 4:50am UTC](https://discourse.openondemand.org/t/open-ondemand-4-0-seems-slow/3972/4 "2025-04-09T04:50:50Z")

</div>

@jeff.ohrstrom

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.

I hope this is helpful.

Best,

---

<div class="post-metadata">

**Author:** ![mjbludwig](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/mjbludwig/32/684_2.png) [@mjbludwig](https://discourse.openondemand.org/u/mjbludwig)\
**Post date:** [April 9, 2025, 1:09pm UTC](https://discourse.openondemand.org/t/open-ondemand-4-0-seems-slow/3972/5 "2025-04-09T13:09:45Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![mnakao](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/mnakao/32/1001_2.png) [@mnakao](https://discourse.openondemand.org/u/mnakao)\
**Post date:** [April 9, 2025, 11:47pm UTC](https://discourse.openondemand.org/t/open-ondemand-4-0-seems-slow/3972/6 "2025-04-09T23:47:29Z")

</div>

@mjbludwig

> 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.

---

<div class="post-metadata">

**Author:** ![mjbludwig](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/mjbludwig/32/684_2.png) [@mjbludwig](https://discourse.openondemand.org/u/mjbludwig)\
**Post date:** [April 10, 2025, 12:57pm UTC](https://discourse.openondemand.org/t/open-ondemand-4-0-seems-slow/3972/7 "2025-04-10T12:57:29Z")

</div>

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.

This is a pretty extensive example of initializers: [OnDemand-info/config/apps/dashboard/initializers/ood.rb at master · chpc-uofu/OnDemand-info · GitHub](https://github.com/CHPC-UofU/OnDemand-info/blob/master/config/apps/dashboard/initializers/ood.rb)

As that file mentions, you stick your .rb file in `/etc/ood/config/apps/dashboard/initializers/ood.rb`.

---

<div class="post-metadata">

**Author:** ![jeff.ohrstrom](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/jeff.ohrstrom/32/136_2.png) [@jeff.ohrstrom](https://discourse.openondemand.org/u/jeff.ohrstrom)\
**Post date:** [April 10, 2025, 1:26pm UTC](https://discourse.openondemand.org/t/open-ondemand-4-0-seems-slow/3972/8 "2025-04-10T13:26:27Z")

</div>

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.

> **[User Form (form.yml.erb) — Open OnDemand 4.0.0 documentation](https://osc.github.io/ood-documentation/latest/how-tos/app-development/interactive/form.html#global-bc-form-items)**

---

<div class="post-metadata">

**Author:** ![mnakao](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/mnakao/32/1001_2.png) [@mnakao](https://discourse.openondemand.org/u/mnakao)\
**Post date:** [April 11, 2025, 2:40am UTC](https://discourse.openondemand.org/t/open-ondemand-4-0-seems-slow/3972/9 "2025-04-11T02:40:40Z")

</div>

@mjbludwig @jeff.ohrstrom

Thank you for your advices. I will try to optimize it using the method you taught me.  
I am also looking forward to the release of v4.1.

Thank you in advance.

---

<div class="post-metadata">

**Author:** ![mnakao](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/mnakao/32/1001_2.png) [@mnakao](https://discourse.openondemand.org/u/mnakao)\
**Post date:** [April 30, 2025, 7:47am UTC](https://discourse.openondemand.org/t/open-ondemand-4-0-seems-slow/3972/10 "2025-04-30T07:47:38Z")

</div>

After setting `Global Batch Connect Form Items` and upgrading to Open OnDemand v4.0.3, everything became much faster. Thanks!

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex015/uploads/osc/original/2X/b/bae70bd0ed39a3ae769c2108155f4cb3e9da8385.png) [@system](https://discourse.openondemand.org/u/system)\
**Post date:** [October 27, 2025, 7:47am UTC](https://discourse.openondemand.org/t/open-ondemand-4-0-seems-slow/3972/11 "2025-10-27T07:47:54Z")

</div>

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.
