Project

General

Profile

Bug #1817

Rendering edit templates takes a very long time

Added by Nacho Barrientos about 10 years ago. Updated over 1 year ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Difficulty:
Triaged:
No
Bugzilla link:
Pull request:
Fixed in Releases:
Found in Releases:

Description

Hi,

We've been experiencing very long response times using the UI to edit some entities, mainly hosts and hostgroups.

After some investigation, we found out that in some cases some edit operations were taking even longer than 20 seconds.

Average time in ms calculated from the log files:

[root@foreman01 foreman]# zcat .gz | egrep "Rendered.+edit" | sed -e "s/[^)](\([0-9.]*\)ms)/\1/" | awk '{s+=$1} END {print s/NR}'

5805.36

Attached is a full log entry for one edit operation that took 12818ms.

We're running Foreman 1.0.0 installed from RPMs taken from yum.theforeman.org/development/el6/x86_64.

Follow up if you need more debug data or information about any particular configuration detail.

production.log production.log 369 KB Nacho Barrientos, 08/09/2012 10:02 AM

History

#1 Updated by Ohad Levy almost 10 years ago

it seems like rendering the page took most of the time (vs. sql), I'll try to see if we can cache some of the html (e.g. maybe things like classes selection etc) thanks for reporting!

#2 Updated by Daniel Lobato Garcia over 9 years ago

Been looking into it for a while, it looks to me that the templates that are causing the greatest delays are usually:

edit
_form
_list
_filters
index
show

for:

hostgroups
users
operating systems
hosts

Some of these can be greatly improved with gem multi_fetch_fragments(1). As for the ones that don't require rendering collections of elements, I don't know how to improve these. Any insights?

1: http://ninjasandrobots.com/rails-faster-partial-rendering-and-caching/

#3 Updated by Leos Stejskal over 1 year ago

  • Status changed from New to Closed
  • Description updated (diff)

I'm closing the issue,
it's here for some time and I wasn't able to reproduce it on latest version.
If you believe that the issue is still relevant feel free to reopen it.

Also available in: Atom PDF