Bug 876844 - Script stops working on page
Script stops working on page
Status: CLOSED NOTABUG
Product: Zanata
Classification: Community
Component: Performance (Show other bugs)
2.0
Unspecified Unspecified
low Severity low
: ---
: ---
Assigned To: Patrick Huang
Zanata-QA Mailling List
: screened
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-11-15 01:30 EST by Hedda Peters
Modified: 2015-02-25 01:23 EST (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-02-25 01:23:13 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Hedda Peters 2012-11-15 01:30:38 EST
Description of problem:
Occasionally I get the browser warning that "a script on this page is busy or not responding..." Most often I see script no 1, occasionally others like no 2:
1. https://translate.engineering.redhat.com/webtrans/codemirror-compressed.js:1
2. https://translate.engineering.redhat.com/webtrans/416E149374AC1C5769C28FCD53C21832.cache.html:4890 


Version-Release number of selected component (if applicable):
2.0

How reproducible:
sometimes

Steps to Reproduce:
1. open project in editor
2. load new/next page in that document

  
Actual results:
Sometimes a script stops working when trying to change to a new page.

Expected results:
No warning

Additional info:
This is on FF 16
Comment 1 Hedda Peters 2012-11-15 01:33:28 EST
I should add that when simply clicking on "continue" instead of "stop script" on that warning, everything seems to keep working fine - new page loads, no issues.
Comment 2 Patrick Huang 2012-11-20 01:13:49 EST
May need to change firefox default timeout on scripts or switch to Chrome as a work around
Comment 3 Noriko Mizumoto 2012-12-02 20:09:57 EST
It seems that I am experiencing same.

Warning: Script not responded
"The script of this page takes longer for processing or not responding. Choose to stop the script now or to continue.

Script: https://translate.zanata.org/zanata/webtrans/codemirror-compressed.js:1"

As Chrome is not default brower, I tried to install but failed.
Comment 5 Patrick Huang 2014-04-22 20:43:36 EDT
When my CPU is busy doing other works (i.e. compiling code), even zimbra will give me this warning(I open zimbra in Firefox). It's common in javascript heavy site. If you are using firefox, please follow bellow link to adjust the setting.

https://support.mozilla.org/en-US/kb/warning-unresponsive-script#w_letting-the-script-run-longer
Comment 6 Sean Flanigan 2014-04-22 22:58:00 EDT
Increasing the script timeout is a workaround, but if this is happening, it means our JavaScript is doing too much synchronous work all at once.  We need to look at what happens synchronously when loading a new page, and find ways of breaking up the work.

http://stackoverflow.com/a/2686177/14379
http://www.nczonline.net/blog/2009/01/13/speed-up-your-javascript-part-1/
Comment 7 Hedda Peters 2014-04-22 23:11:55 EDT
I'm glad you say that, Sean. 

Also, I've tried the workaround and it effectively doesn't make a difference. I disabled the actual notifications a long time ago anyway, but the "freezing" (firefox window going grey) still happened. After changing the timeout value the behaviour hasn't changed, firefox still freezes for a few moments every time I load a new page (and sometimes on other occasions)

Using Chrome/Chromium instead is no option.
Comment 9 Sean Flanigan 2014-04-22 23:33:20 EDT
I haven't been able to reproduce the timeout with Firebug running yet, but if RPC deserialisation is the problem, we might just have to make multiple smaller requests.  

If slow DOM manipulation is the problem, we might be able to use GWT's Scheduler.scheduleIncremental to help.  But ultimately this may be unavoidable while we continue to use CodeMirror plus the current editor table based on Grid and Composite.

http://stackoverflow.com/a/8760527/14379
Comment 11 Hedda Peters 2014-04-23 19:47:24 EDT
I should add that this happens at other times, too, not only when loading a new page of the same document.

It sometimes happens when going to a different tab in the browser (to research some term for my translation) and then going back to Zanata. It sometimes happens when pasting text into the editor. It sometimes happens when changing between search&replace and the editor. And it almost always happens when loading a new page.

Overall this is a big performance problem, and during some tasks (e.g. proofreading, going back and forth between browser tabs and different documents on Zanata a lot) I find it slows me down a lot.

BTW, my CPU is not busy doing anything else. Two browsers, Thunderbird and Xchat are running, that's usually it.

Thanks for looking into it.
Comment 12 Michelle Kim 2015-02-25 00:44:18 EST
Hi Hedda.

Have you experienced this issue recently?
Comment 13 Michelle Kim 2015-02-25 00:45:14 EST
Hi Damian,

Can you help reproducing this bug to see if this is fixed or still an issue? Thanks.
Comment 14 Hedda Peters 2015-02-25 00:47:45 EST
I havent seen this happing in quite some time. :-)
Comment 15 Michelle Kim 2015-02-25 01:23:13 EST
Thanks Hedda. Closing per your feedback. If it happens again, feel free to re-open the bug.

Note You need to log in before you can comment on or make changes to this bug.