It's all about the answers!

Ask a question

Custom viewlet blocking web loading - how to avoid


Jorge Diaz (8664434) | asked Feb 27 '12, 11:39 a.m.
JAZZ DEVELOPER
Hello,

I have developed a custom viewlet similar to the "External Content" one. We are loading in house jsp pages passing a set of parameters, but while the viewlet loads (sometimes slow), making the page to be blocked until the operation completes (WorkItems menu for instance).

Does anybody know a way of making the load occur without that blocking?

Thanks!

Regards,

Jorge.

3 answers



permanent link
Mike Pawlowski (6861) | answered Mar 02 '12, 12:38 p.m.
JAZZ DEVELOPER
Hi Jorge,

More information is required in order to help debug your situation.

>> I have developed a custom viewlet similar to the "External Content" one.

Can you clarify or explain how the viewlet operates / was implemented in more detail? Can I assume you mean that the JSP content is being hosted inside of an iframe?

>> but while the viewlet loads (sometimes slow), making the page to be blocked until the operation completes

Usually viewlets are sufficiently sandboxed from these type of issues because they are dynamically loaded - especially if the content is hosted inside an iframe.

Do you have the Firefox Firebug plug-in installed?
If so, can you enable the "Net" tab and inspect which HTTP requests are taking long to complete and are blocking the Web UI to load.

High browser memory usage or CPU utilization can have a blocking effect on all browser operations. That is another area that should be monitored (e.g. using Task Manager).

What version of the RTC server are you running on?

If you are doing any non-REST based service calls in JavaScript that are long-running or computation heavy, it will block the UI thread.
We work around this limitation by implicitly creating a new "thread" (i.e. Emulate. JavaScript doesnt really have multi-threading capabilities) using a timeout that executes right away:

this._yieldTimeout = setTimeout(dojo.hitch(this, this._loadContent, true), 0);

_loadContent: function(doIt) {
// Do long-running, computation heavy work here
},

Thanks,

permanent link
Jorge Diaz (8664434) | answered Mar 05 '12, 3:02 p.m.
JAZZ DEVELOPER
Hi,

I try to answer your questions ...


Can you clarify or explain how the viewlet operates / was implemented in more detail? Can I assume you mean that the JSP content is being hosted inside of an iframe?

>> yes, exactly:


dojo.create("iframe", {
'src': url,
'height': this.getPreference("frameHeight") + "px",
'width' : "100%",
'frameBorder': 0
}, this._frameArea, "only");



"Net" tab and inspect which HTTP requests are taking long to complete and are blocking the Web UI to load.

>> there is no just couple of HTTP requests, but the longest to complete are to load the "css" files from the JSP

High browser memory usage or CPU utilization can have a blocking effect on all browser operations. That is another area that should be monitored (e.g. using Task Manager).

>> Not the case. The browser is the only one affected, rest of applications behave with no impact.

What version of the RTC server are you running on?

>> 3.0.1.1


>> I will try your thread emulation workaround. Any other tip will be welcome.

Thanks in advance for your help!

Jorge.

permanent link
Jorge Diaz (8664434) | answered Mar 07 '12, 9:44 a.m.
JAZZ DEVELOPER
Hello Mike,

I applied the workaround you suggested. At the beggining of the load it seems that works allowing the user to access some other menus (like Work Items menus), however, once the load of the jsp page resources begins the sources download, the dashboard ui gets stuck again.

Any idea of how to work around it?

Thanks in advance for the help.

Regards,

Jorge.

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.