Quantcast

Performance Issues in Dojo

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Performance Issues in Dojo

Nikhil Gupta
Hi,

My clients are complaining about the performance of the module that we
did using Dojo. The main issue is that they get script errors in
browsers -"Unresponsive script". This is happening more in IE8 as
compared to Firefox.

1. Is there something that can be done to fix this issue?
2. Is there a particular set of settings for IE8 that Dojo works better
with?


I know the question is wide open without letting you know what the app
is doing, but I was looking for a general solution, if any.

I will be working on re-customizing the application to reduce the
processing happening on one page..may be its too much of processing to
handle.

Any pointers to fix this issue?

Thanks and appreciate your help,


~Nick

________________________________________________________
Dojotoolkit: http://dojotoolkit.org
Reference Guide: http://dojotoolkit.org/reference-guide
API Documentation: http://dojotoolkit.org/api
Tutorials: http://dojotoolkit.org/documentation

[hidden email]
http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Performance Issues in Dojo

Nikhil Gupta
Oops forgot to mention that we are using Dojo 1.5

On 8/20/2011 7:37 AM, Nikhil Gupta wrote:

> Hi,
>
> My clients are complaining about the performance of the module that we
> did using Dojo. The main issue is that they get script errors in
> browsers -"Unresponsive script". This is happening more in IE8 as
> compared to Firefox.
>
> 1. Is there something that can be done to fix this issue?
> 2. Is there a particular set of settings for IE8 that Dojo works better
> with?
>
>
> I know the question is wide open without letting you know what the app
> is doing, but I was looking for a general solution, if any.
>
> I will be working on re-customizing the application to reduce the
> processing happening on one page..may be its too much of processing to
> handle.
>
> Any pointers to fix this issue?
>
> Thanks and appreciate your help,
>
>
> ~Nick
>
> ________________________________________________________
> Dojotoolkit: http://dojotoolkit.org
> Reference Guide: http://dojotoolkit.org/reference-guide
> API Documentation: http://dojotoolkit.org/api
> Tutorials: http://dojotoolkit.org/documentation
>
> [hidden email]
> http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest
>


________________________________________________________
Dojotoolkit: http://dojotoolkit.org
Reference Guide: http://dojotoolkit.org/reference-guide
API Documentation: http://dojotoolkit.org/api
Tutorials: http://dojotoolkit.org/documentation

[hidden email]
http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Performance Issues in Dojo

Peter Svensson
Hi Nihil,

It is, as you say, a very general type of error and I'm fairly sure that Dojo isn't the culprit here. When I get unresponsive webpages I have generally had two kinds of problems; 

1) My code has gone into an infinite loop due to something breaking. Perhaps I'm looping through all values of some array until I come to one that has a property set to -1 (for example) and that never happens
2) The webserver is so slow in delivering the files that the scripts time out, leading to odd conditions. This happens with standard IIS when you use several browsers in succession to connect to it (iisreset between browsers solves this).

I would recommend you to use  debugger and set breakpoints in your code to try to pinpoint if and where errors occur. Also, try to surrond critical places with try/catch staements. Sometimes JS errors get swallowed up and not reported back to the console.

Cheers,
PS

On Sat, Aug 20, 2011 at 4:40 PM, Nikhil Gupta <[hidden email]> wrote:
Oops forgot to mention that we are using Dojo 1.5

On 8/20/2011 7:37 AM, Nikhil Gupta wrote:
> Hi,
>
> My clients are complaining about the performance of the module that we
> did using Dojo. The main issue is that they get script errors in
> browsers -"Unresponsive script". This is happening more in IE8 as
> compared to Firefox.
>
> 1. Is there something that can be done to fix this issue?
> 2. Is there a particular set of settings for IE8 that Dojo works better
> with?
>
>
> I know the question is wide open without letting you know what the app
> is doing, but I was looking for a general solution, if any.
>
> I will be working on re-customizing the application to reduce the
> processing happening on one page..may be its too much of processing to
> handle.
>
> Any pointers to fix this issue?
>
> Thanks and appreciate your help,
>
>
> ~Nick
>
> ________________________________________________________
> Dojotoolkit: http://dojotoolkit.org
> Reference Guide: http://dojotoolkit.org/reference-guide
> API Documentation: http://dojotoolkit.org/api
> Tutorials: http://dojotoolkit.org/documentation
>
> [hidden email]
> http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest
>


________________________________________________________
Dojotoolkit: http://dojotoolkit.org
Reference Guide: http://dojotoolkit.org/reference-guide
API Documentation: http://dojotoolkit.org/api
Tutorials: http://dojotoolkit.org/documentation

[hidden email]
http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest



--

http://se.linkedin.com/in/petersvensson
--
http://twitter.com/psvensson (@psvensson)

________________________________________________________
Dojotoolkit: http://dojotoolkit.org
Reference Guide: http://dojotoolkit.org/reference-guide
API Documentation: http://dojotoolkit.org/api
Tutorials: http://dojotoolkit.org/documentation

[hidden email]
http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Performance Issues in Dojo

Nikhil Gupta
Hi Peter,

Thanks for your response.

The issue is only in IE, and in firefox the application works much
better. I dont see lot of lag in FF, when compared with IE.

Please let me know if that can point to something that i can do to fix
the issue

Thanks

On 8/20/2011 8:10 AM, Peter Svensson wrote:

> Hi Nihil,
>
> It is, as you say, a very general type of error and I'm fairly sure that
> Dojo isn't the culprit here. When I get unresponsive webpages I have
> generally had two kinds of problems;
>
> 1) My code has gone into an infinite loop due to something breaking.
> Perhaps I'm looping through all values of some array until I come to one
> that has a property set to -1 (for example) and that never happens
> 2) The webserver is so slow in delivering the files that the scripts
> time out, leading to odd conditions. This happens with standard IIS when
> you use several browsers in succession to connect to it (iisreset
> between browsers solves this).
>
> I would recommend you to use  debugger and set breakpoints in your code
> to try to pinpoint if and where errors occur. Also, try to surrond
> critical places with try/catch staements. Sometimes JS errors get
> swallowed up and not reported back to the console.
>
> Cheers,
> PS
>
> On Sat, Aug 20, 2011 at 4:40 PM, Nikhil Gupta <[hidden email]
> <mailto:[hidden email]>> wrote:
>
>     Oops forgot to mention that we are using Dojo 1.5
>
>     On 8/20/2011 7:37 AM, Nikhil Gupta wrote:
>      > Hi,
>      >
>      > My clients are complaining about the performance of the module
>     that we
>      > did using Dojo. The main issue is that they get script errors in
>      > browsers -"Unresponsive script". This is happening more in IE8 as
>      > compared to Firefox.
>      >
>      > 1. Is there something that can be done to fix this issue?
>      > 2. Is there a particular set of settings for IE8 that Dojo works
>     better
>      > with?
>      >
>      >
>      > I know the question is wide open without letting you know what
>     the app
>      > is doing, but I was looking for a general solution, if any.
>      >
>      > I will be working on re-customizing the application to reduce the
>      > processing happening on one page..may be its too much of
>     processing to
>      > handle.
>      >
>      > Any pointers to fix this issue?
>      >
>      > Thanks and appreciate your help,
>      >
>      >
>      > ~Nick
>      >
>      > ________________________________________________________
>      > Dojotoolkit: http://dojotoolkit.org
>      > Reference Guide: http://dojotoolkit.org/reference-guide
>      > API Documentation: http://dojotoolkit.org/api
>      > Tutorials: http://dojotoolkit.org/documentation
>      >
>      > [hidden email]
>     <mailto:[hidden email]>
>      > http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest
>      >
>
>
>     ________________________________________________________
>     Dojotoolkit: http://dojotoolkit.org
>     Reference Guide: http://dojotoolkit.org/reference-guide
>     API Documentation: http://dojotoolkit.org/api
>     Tutorials: http://dojotoolkit.org/documentation
>
>     [hidden email]
>     <mailto:[hidden email]>
>     http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest
>
>
>
>
> --
>
> http://se.linkedin.com/in/petersvensson
> --
> http://twitter.com/psvensson (@psvensson)
>
>
>
> ________________________________________________________
> Dojotoolkit: http://dojotoolkit.org
> Reference Guide: http://dojotoolkit.org/reference-guide
> API Documentation: http://dojotoolkit.org/api
> Tutorials: http://dojotoolkit.org/documentation
>
> [hidden email]
> http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest


________________________________________________________
Dojotoolkit: http://dojotoolkit.org
Reference Guide: http://dojotoolkit.org/reference-guide
API Documentation: http://dojotoolkit.org/api
Tutorials: http://dojotoolkit.org/documentation

[hidden email]
http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Performance Issues in Dojo

Peter Svensson
Hi Nihil. 

IE is always a bit quirky and is very fond of riding the syntax rules high but letting you know little when you have erred.
A common problem is arrays of object that are comma-separated where you accidentally have left a trailing comma, like this;

["foo", "bar", "baz", ]

Which IE really don't like.

You could also benefit from running JSLint on your code to find any common errors which might have crept in.

Cheers,
PS

On Sat, Aug 20, 2011 at 8:02 PM, Nikhil Gupta <[hidden email]> wrote:
Hi Peter,

Thanks for your response.

The issue is only in IE, and in firefox the application works much better. I dont see lot of lag in FF, when compared with IE.

Please let me know if that can point to something that i can do to fix the issue

Thanks


On 8/20/2011 8:10 AM, Peter Svensson wrote:
Hi Nihil,

It is, as you say, a very general type of error and I'm fairly sure that
Dojo isn't the culprit here. When I get unresponsive webpages I have
generally had two kinds of problems;

1) My code has gone into an infinite loop due to something breaking.
Perhaps I'm looping through all values of some array until I come to one
that has a property set to -1 (for example) and that never happens
2) The webserver is so slow in delivering the files that the scripts
time out, leading to odd conditions. This happens with standard IIS when
you use several browsers in succession to connect to it (iisreset
between browsers solves this).

I would recommend you to use  debugger and set breakpoints in your code
to try to pinpoint if and where errors occur. Also, try to surrond
critical places with try/catch staements. Sometimes JS errors get
swallowed up and not reported back to the console.

Cheers,
PS

On Sat, Aug 20, 2011 at 4:40 PM, Nikhil Gupta <[hidden email]
<mailto:[hidden email]>> wrote:

   Oops forgot to mention that we are using Dojo 1.5

   On 8/20/2011 7:37 AM, Nikhil Gupta wrote:
    > Hi,
    >
    > My clients are complaining about the performance of the module
   that we
    > did using Dojo. The main issue is that they get script errors in
    > browsers -"Unresponsive script". This is happening more in IE8 as
    > compared to Firefox.
    >
    > 1. Is there something that can be done to fix this issue?
    > 2. Is there a particular set of settings for IE8 that Dojo works
   better
    > with?
    >
    >
    > I know the question is wide open without letting you know what
   the app
    > is doing, but I was looking for a general solution, if any.
    >
    > I will be working on re-customizing the application to reduce the
    > processing happening on one page..may be its too much of
   processing to
    > handle.
    >
    > Any pointers to fix this issue?
    >
    > Thanks and appreciate your help,
    >
    >
    > ~Nick
    >
    > ________________________________________________________
    > Dojotoolkit: http://dojotoolkit.org
    > Reference Guide: http://dojotoolkit.org/reference-guide
    > API Documentation: http://dojotoolkit.org/api
    > Tutorials: http://dojotoolkit.org/documentation
    >
    > [hidden email]
   <mailto:[hidden email]>

    > http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest
    >


   ________________________________________________________
   Dojotoolkit: http://dojotoolkit.org
   Reference Guide: http://dojotoolkit.org/reference-guide
   API Documentation: http://dojotoolkit.org/api
   Tutorials: http://dojotoolkit.org/documentation

   [hidden email]
   <mailto:[hidden email]>




--

http://se.linkedin.com/in/petersvensson
--
http://twitter.com/psvensson (@psvensson)

________________________________________________________
Dojotoolkit: http://dojotoolkit.org
Reference Guide: http://dojotoolkit.org/reference-guide
API Documentation: http://dojotoolkit.org/api
Tutorials: http://dojotoolkit.org/documentation

[hidden email]
http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Performance Issues in Dojo

Stephen Chung
This post has NOT been accepted by the mailing list yet.
In reply to this post by Nikhil Gupta
IE before version 9 is also VERY SLOW in JavaScript performance as compared to other modern browsers.  You must have an expensive calculation loop in your code that runs in a resonable time under FF, but runs 10x slower in IE8.

If you must support IE8, then you'll need to break up your loop into chunks and yield back to the browser once in a whie -- put a continuation with setTimeout.

- Stephen
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Performance Issues in Dojo

j105.rob
In reply to this post by Peter Svensson
Are you using dojo.io.script or any cross origin/cross domain calls? There is an issue with the xhr call being aborted for whatever reason and the script will loop forever if the call aborts. Double check all of your xhr calls to make sure that you do not have any weird aborting issues or any cross origin OPTIONS requests. There is a time out on that script, but it seems like out of the box, it just loops. I noticed in the code that there was a TODO to handle the abort, but it has never been implemented.

On Sat, Aug 20, 2011 at 3:35 PM, Peter Svensson <[hidden email]> wrote:
Hi Nihil. 

IE is always a bit quirky and is very fond of riding the syntax rules high but letting you know little when you have erred.
A common problem is arrays of object that are comma-separated where you accidentally have left a trailing comma, like this;

["foo", "bar", "baz", ]

Which IE really don't like.

You could also benefit from running JSLint on your code to find any common errors which might have crept in.

Cheers,
PS


On Sat, Aug 20, 2011 at 8:02 PM, Nikhil Gupta <[hidden email]> wrote:
Hi Peter,

Thanks for your response.

The issue is only in IE, and in firefox the application works much better. I dont see lot of lag in FF, when compared with IE.

Please let me know if that can point to something that i can do to fix the issue

Thanks


On 8/20/2011 8:10 AM, Peter Svensson wrote:
Hi Nihil,

It is, as you say, a very general type of error and I'm fairly sure that
Dojo isn't the culprit here. When I get unresponsive webpages I have
generally had two kinds of problems;

1) My code has gone into an infinite loop due to something breaking.
Perhaps I'm looping through all values of some array until I come to one
that has a property set to -1 (for example) and that never happens
2) The webserver is so slow in delivering the files that the scripts
time out, leading to odd conditions. This happens with standard IIS when
you use several browsers in succession to connect to it (iisreset
between browsers solves this).

I would recommend you to use  debugger and set breakpoints in your code
to try to pinpoint if and where errors occur. Also, try to surrond
critical places with try/catch staements. Sometimes JS errors get
swallowed up and not reported back to the console.

Cheers,
PS

On Sat, Aug 20, 2011 at 4:40 PM, Nikhil Gupta <[hidden email]
<mailto:[hidden email]>> wrote:

   Oops forgot to mention that we are using Dojo 1.5

   On 8/20/2011 7:37 AM, Nikhil Gupta wrote:
    > Hi,
    >
    > My clients are complaining about the performance of the module
   that we
    > did using Dojo. The main issue is that they get script errors in
    > browsers -"Unresponsive script". This is happening more in IE8 as
    > compared to Firefox.
    >
    > 1. Is there something that can be done to fix this issue?
    > 2. Is there a particular set of settings for IE8 that Dojo works
   better
    > with?
    >
    >
    > I know the question is wide open without letting you know what
   the app
    > is doing, but I was looking for a general solution, if any.
    >
    > I will be working on re-customizing the application to reduce the
    > processing happening on one page..may be its too much of
   processing to
    > handle.
    >
    > Any pointers to fix this issue?
    >
    > Thanks and appreciate your help,
    >
    >
    > ~Nick
    >
    > ________________________________________________________
    > Dojotoolkit: http://dojotoolkit.org
    > Reference Guide: http://dojotoolkit.org/reference-guide
    > API Documentation: http://dojotoolkit.org/api
    > Tutorials: http://dojotoolkit.org/documentation
    >
    > [hidden email]
   <mailto:[hidden email]>

    > http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest
    >


   ________________________________________________________
   Dojotoolkit: http://dojotoolkit.org
   Reference Guide: http://dojotoolkit.org/reference-guide
   API Documentation: http://dojotoolkit.org/api
   Tutorials: http://dojotoolkit.org/documentation

   [hidden email]
   <mailto:[hidden email]>




--

________________________________________________________
Dojotoolkit: http://dojotoolkit.org
Reference Guide: http://dojotoolkit.org/reference-guide
API Documentation: http://dojotoolkit.org/api
Tutorials: http://dojotoolkit.org/documentation

[hidden email]
http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest



________________________________________________________
Dojotoolkit: http://dojotoolkit.org
Reference Guide: http://dojotoolkit.org/reference-guide
API Documentation: http://dojotoolkit.org/api
Tutorials: http://dojotoolkit.org/documentation

[hidden email]
http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest
Loading...