cancel
Showing results for 
Search instead for 
Did you mean: 

Performance issue in Application

Former Member
0 Kudos

Hi,

I am comparing the values in an array with the values in a column of the Grid. if it matches then it will highlight the coressponding rows.

getGridObject().setSelectedRow(i);

If there are less values in the array then it will work fine but if there are many values in the array then only few rows will be highlighted in the Grid and loop will get stuck.

Ex - For 50 values in array it will work fine but if there are 200 values in array then the loop will get stuck.

Javascript error message at the bottom: unspecified error.

Regards,

Anil

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Anil,

Usually for 200 rowcount, you should not face performance issue.

If there is so many Applications in one Production server, then it will be overloaded. Suppose Java Applications and xMII Application are consuming lots of memory space and you are going to schedule lots of jobs in xMII, then it will be overloaded.

Because of overloaded, system is becoming slow and you are getting error message as :unspecified error.

First you need to check how much memory your Java Applications and xMII Aplication is consuming. If it exceeds the RAM then system will be hanged.

Thanks,

Manisha

Former Member
0 Kudos

Hi Manisha,

How to check how much memory Java Applications and xMII Aplication is consuming?

Regards,

Anil

Former Member
0 Kudos

Hi Anil,

In your C: drive check how much memory is consuming by xMII applications like what is the size of Lighthammer, wwwroot and inetpub folders.Also check what is the total space for C:drive and how much free space is left.

Simillary for java applications you need to chek if any java application is running in same server.

Thanks,

Manisha

Former Member
0 Kudos

Hi,

To improve the performance issue, you should not schedule two big transactions(means taking lots of space) at the same time.You can also restart the services in your server.

Thanks,

Manisha

Former Member
0 Kudos

Anil,

In my view, if you are comparing the each content of the array with each Cell of the Column in the grid, this will consume memory of the client machine and not the server,

The Logic that you are trying to build to highlight the Row based on some comparison, you can build that login in the Display Template Instead in the Color Context Tab.

Hope this helps

Regards

Rupesh

Former Member
0 Kudos

Manesh/Anil:

Server performance has nothing to do with "setSelectedRow()" performance. That action is entirely client side...

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi,

Thanks for the suggestions

I am using the following code. How can I tune this code to improve the performance?

var array;

var chk = 0;

for(var j=1;j <= xyz.getGridObject().getRowCount();j++)

{

for(i=0;i < array.length;i++)

{

if(xyz.getGridObject().getCellValue(j,1) == array<i>)

{

xyz.getGridObject().setSelectedRow(j);

chk++;

break;

}

}

if(chk == array.length)

{

break;

}

}

Former Member
0 Kudos

Anil,

I suggest you to put your highlighting logic in BLS itself, this is as explained below.

I am assuming the data in your array is also coming from server.

Into your XML output, put one more column which will have value corresponding to the colur that you want to highlight( the value you can put with the same logic that you have in your webpage).

Now in your display template editor under the colur context tab, match that column to the colur that you need as per your requirement.

this will save your efforts at Webpage designing.

Hope this helps

Regards

Former Member
0 Kudos

Hi Anil,

The javascript code looks fine. Just one thing which can be taken care is - avoiding usage of function calls in for loop.

e.g. for(var j=1;j <= xyz.getGridObject().getRowCount();j++)

instead, just have a variable for storing the row count before the for loop so that it is calculated only once and not every time the for loop is run.

That sure would prevent some overhead.

Also,

As you are using xyz.getGridObject() couple of times, have that as well in a variable.

Thanks,

Ankit Jain

Former Member
0 Kudos

Hi

I have some doubts:

if(xyz.getGridObject().getCellValue(j,1) == array)

Is 'array' a array?

If it is, '== array' equal to '== array[0]'

If you want to compare cell value with each item value in this array

you should use

if(xyz.getGridObject().getCellValue(j,1) == array<i>)

And what is chk meaning?

if(chk == array.length)
{
break;
} 

Suppose array.length = 8,

and every time setSelectedRow, chk+1,

then after selecting 8 rows, chk == array.length, break.

Means finish the whole for cycle.

So the maximal num of rows can be selected is equals to the length of array.

Is it the result you wanna?

I think maybe it is the reason that you can not highlight many rows.

For performance, you should

var rowCount = xyz.getGridObject().getRowCount();
for(var j=1;j <= rowCount ;j++) 

Hope it can help you!

Best Regards

Kavin

Former Member
0 Kudos

Hi,

I also think use setCellBackGroundColor to highlight the row instead is a better way.

Notice to set all the cell back ground color in that row.

And if you have some update on this grid, you'd better extract the highlight process as a function.

Evoke it when page onloading and after every updating of the grid.

Former Member
0 Kudos

Hi Anil,

I think that this is the issue with javascript...

Check your java script...

My suggestions to improve the performance:

1. Use setCellBackGroundColor to highlight the row instead of using setSelectedRow.

2. If you are not doing any interaction with the grid, use the servlet and write XSLT sheet to change the color of the row.

Regards,

Kishore

Former Member
0 Kudos

Check you're Javascript. Maybe you have a memory leak somewhere in your loop. Try looping on the grid set instead. Best bet for something like this is usually generating the html with an xsl.