Bug 876844 - Script stops working on page
Summary: Script stops working on page
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Zanata
Classification: Retired
Component: Performance
Version: 2.0
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: ---
: ---
Assignee: Patrick Huang
QA Contact: Zanata-QA Mailling List
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-11-15 06:30 UTC by Hedda Peters
Modified: 2015-02-25 06:23 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-02-25 06:23:13 UTC
Embargoed:


Attachments (Terms of Use)

Description Hedda Peters 2012-11-15 06:30:38 UTC
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 06:33:28 UTC
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 06:13:49 UTC
May need to change firefox default timeout on scripts or switch to Chrome as a work around

Comment 3 Noriko Mizumoto 2012-12-03 01:09:57 UTC
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-23 00:43:36 UTC
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-23 02:58:00 UTC
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-23 03:11:55 UTC
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-23 03:33:20 UTC
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 23:47:24 UTC
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 05:44:18 UTC
Hi Hedda.

Have you experienced this issue recently?

Comment 13 Michelle Kim 2015-02-25 05:45:14 UTC
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 05:47:45 UTC
I havent seen this happing in quite some time. :-)

Comment 15 Michelle Kim 2015-02-25 06:23:13 UTC
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.