Bug 735913

Summary: Opening job with many tasks an attempt to see results in FF6 leads to 100% CPU usage and probably a memory leak
Product: [Retired] Beaker Reporter: Marian Csontos <mcsontos>
Component: web UIAssignee: Dan Callaghan <dcallagh>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: high Docs Contact:
Priority: unspecified    
Version: 0.7CC: azelinka, bpeck, dcallagh, jgalipea, mcsontos, rmancy, stl
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-03-15 00:16:46 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 751330    

Description Marian Csontos 2011-09-06 06:59:06 UTC
Description of problem:
When opening J:127555 in FF6 (latest in F15) it is running forever at very high CPU usage and produces no results.

Likely related to the size of a job: this one has 5 recipes with 196 tasks and 1120 results each.

Version-Release number of selected component (if applicable):
WebUI: beaker-0.7.00
firefox-6.0-1.fc15.x86_64 (with clean profile)

How reproducible:
100%

Steps to Reproduce:
1. Open J:127555 in FF6
2. Click "Results" button
  
Actual results:
No results but high CPU and memory consumption.
Looks like a memory leak: firefox climbs some 900MiB over its normal memory usage and counting. I was not patient enough to see it OOM-killed...

Expected results:
Yeah, results were expected.

Additional info:

I also saw following alert:

> A script on this page may be busy, or it may have stopped responding.
> You can stop the script now, or you can continue to see if the script
> will complete.
>
> Script: https://beaker.engineering.redhat.com/static/javascript/local_datetime.js:30 

IMO it may not be necessary bug in local_datetime, but FF just break the execution at given line...

Comment 1 Dan Callaghan 2011-11-01 05:33:34 UTC
This is almost certainly due to the datetime localisation script, which is not very efficient.

Maybe it should detect when the page has become particularly large and disable itself, leaving just UTC timestamps? Users might find that a little unexpected though.

Comment 2 Dan Callaghan 2011-11-09 06:20:31 UTC
We can fix this by avoiding jQuery's $().text() function, and using the .textContent attribute instead. In Firefox 7 on my machine this reduces the script's runtime to a few seconds even when loading very large results.

Comment 3 Dan Callaghan 2012-10-10 05:44:20 UTC
*** Bug 740372 has been marked as a duplicate of this bug. ***