Project

General

Profile

Actions

Bug #1817

closed

Rendering edit templates takes a very long time

Added by Nacho Barrientos over 11 years ago. Updated almost 3 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Difficulty:
Triaged:
No
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.


Files

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

Updated by Ohad Levy over 11 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!

Actions #2

Updated by Daniel Lobato Garcia over 11 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/

Actions #3

Updated by Leos Stejskal almost 3 years ago

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

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.

Actions

Also available in: Atom PDF